Perhaps I haven't grasped GraphQL yet, but I want to update a complex record in the DB. I'm having trouble finding docs that explain this, which doesn't use a trivial example. I am using FaunaDB and trying to test things in the GraphQL playground before implementing it in JS.
Here is an an example of my schema:
type Event {
name: String!
email: String!
eventName: String!
location: String
guests: [Guest!]!
note: String!
confirmed: Boolean!
completed: Boolean!
dateTimeStart: Time
dateTimeEnd: Time
sentConfirmation: Boolean!
}
type Guest @embedded {
email: String!
rsvp: Boolean
results: SurveyAnswers
}
type SurveyAnswers @embedded {
~ 12 various fields
}
I want to update a field on the event: sentConfirmation, that's it.
I know the event Id and what I want to update the Boolean value to.
Is there a way to write a mutation to just pass in an ID and the updated Boolean value and change that single value, or do I need to literally pass in the entire object and all it's sub objects with just that one top level field updated?