Update patch with blank `remove` section removes selected nodes?

I am using 20.11
and I am unsure if this is a bug or by design

with this schema

type X  {
  id: ID!
  name: String! @id @search(by: [hash, regexp])
  other: String
}

assuming node was created

mutation {
  addX(input:{name: "Example", other: "other_value"}){
    x {
      id       
    }     
  }
}

when i run a updateX mutation with a patch like

mutation($patch: UpdateXInput!) {
  update: updateX(input: $patch) {
  x {      
      id      
    }
  }
}

vars

{
	"patch": {
		"filter": {
			"name": {
				"eq": "Example"
			}
		},
		"set": {
			"other": "test"
		},
		"remove": {}
	}
}

I do get the id back, but then the node is removed

when running with without the remove section

vars

{
	"patch": {
		"filter": {
			"name": {
				"eq": "Example"
			}
		},
		"set": {
			"other": "test"
		}
	}
}

the values are update correctly

Hey @jcsrb, I am able to reproduce this issue locally. This is a bug and should be fixed. "remove" = {} should have no effect on the update mutation. Both must be equivalent.