Skip to content

What passes to the child component: FragmentOf or ResultOf? #86

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

You must be logged in to vote

This is all explained on our docs page on Fragment Colocation: https://gql-tada.0no.co/guides/fragment-colocation/

The first thing of note is, you can unmask fragments. Then the parent document that spreads the fragment will see its full selection type as well.

With masked fragments however, the entire point is that:

  • the parent can't see the fragment's selection
  • the child that defines the fragment receives a masked "ref" type that the parent contains
  • the child then unmasks the fragment

The purpose of this is isolation and enforcing good data dependency practices

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Danbka
Comment options

Answer selected by kitten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants