No validation that an @refetchable queryName is not the name of a fragment
Open
rbalicki2
opened this issue 10 months ago
•
0 comments
If a @refetchable fragment has a queryName which is the name of an existing fragment (say MyFragment), then __generated__/MyFragment.graphql will be the ReaderFragment, and not the ConcreteRequest.
If a persisted queries json file is created (and presumably if the query is persisted to the backend?), then the persisted "query" is actually just the fragments.
Relay should enforce that queryName is globally unique. (Presumably there can be collisions with other query names, too, didn't check)