partial-update-mutation

When this preview feature is enabled, it automatically generates an input type and mutation to support partial document updates.

Enable this preview when querying via the /graphql endpoint.

For example, if partial-update-mutation is enabled and you import the following schema:

type User {
  username: String!
  password: String!
}

Then, apart from all of the elements that are generated automatically, an additional new partialUpdate<Type> mutation and an additional PartialUpdate<Type>Input input type are created as well:

type Mutation {
  partialUpdateUser(id: ID!, data: PartialUpdateUserInput!): User
}

type PartialUpdateUserInput {
  username: String
  password: String
}

All of the fields are optional in the new input type, and any required fields are validated at runtime when executing the query.

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve! documentation@fauna.com

Thank you for your feedback!