Skip to content
Discussion options

You must be logged in to vote

What's causing that TypeScript error is, in fact, Fragment Masking, which is enabled by default with client-preset.

Fragment Masking helps express components' data dependencies with GraphQL Fragments.

By doing so, we ensure that the tree of data is properly passed down to the components without "leaking" data. It also allows to colocate the Fragment definitions with their components counterparts:

That's why TypeScript believes info doesn't exist on the type, because it is masked. If you want to pursue with fragment masking, the component will be responsible for expressing its data requirement by exposing a fragment that we'll be able to use in conjunction with useFragment to unmask the …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by SimonPringleWallace
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
2 participants