Hacker News new | ask | show | jobs
by ilovecaching 3355 days ago
So are you saying that

http://facebook.github.io/relay/docs/graphql-relay-specifica...

no longer applies to Relay Modern? I can use any schema and Relay will just work?

1 comments

Yes, mostly: if you don't meet the first requirement (having some sort of root field that allows you to refetch an object), you'll have trouble using, for example, RelayModern's RefetchContainer. If you don't meet the second requirement (a description of how to page through connections), you'll need to define how to paginate through connections as part of your component's logic (if that matters to you). And the third requirement: you no longer need to use Relay's imperative mutation API. You can simply describe a specific mutation to refetch, including all of the fields (i.e. via a fragment) that you want fetched every time you send that mutation (fat queries are gone in RelayModern).
Did you mean "declarative mutation API"?