Skip to content

It is possible to write an updaters for deep nested fields? #1244

Answered by kitten
RIP21 asked this question in Q&A
Discussion options

You must be logged in to vote

This is a conscious limitation. GraphQL actively discourages you from "name spacing" mutations in result types. There are several reasons for that but two are relevant here:

  • A GraphQL API will run mutation fields in series, which is unique to the mutation root type and important for operations like these that alter data on the backend. Nesting defeats this.
  • There's no way to differentiate between mutating resolver fields and "data" fields on types. This means that all that's differentiating fields running mutations and fields that just resolve data in your schema is now a loose convention.

The latter is relevant because we can feasibly allow updaters to be written for any field. But we …

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@RIP21
Comment options

@JoviDeCroock
Comment options

@kitten
Comment options

@MatthewAry
Comment options

@kitten
Comment options

Answer selected by JoviDeCroock
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants