Skip to content

Should we use ResultOf on fragment documents? #309

Answered by kitten
khurram-ansari asked this question in Q&A
Discussion options

You must be logged in to vote

There's more information here: https://gql-tada.0no.co/guides/fragment-colocation#fragment-colocation-1

Whether you're using @_unmask or not, the FragmentOf utility type will continue to work and give you the correct type. You can use ResultOf on an unmasked fragment, but if you ever remove @_unmask, it'll stop working, whereas readFragment and FragmentOf are designed to work whether the fragment is unmasked or not, to allow you to change your mind later on.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@khurram-ansari
Comment options

Answer selected by khurram-ansari
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