2

I'm trying to figure out the correct schema to pass a Mongo modifier as argument to a GraphQL mutation. Here's a sample modifier:

{
  $set: {
    foo: 'hello world'
  },
  $unset: {
    bar: ''
  }
}

I'm sure this is very simple, but I just can't seem to find the right syntax? Here's what I have so far:

input PostSetModifier {
  $set: {
    foo: String
    bar: String
  }
  $unset: {
    foo: String
    bar: String
  }
}
Sacha
  • 1,987
  • 1
  • 24
  • 41

0 Answers0