graphql-tag
graphql-tag copied to clipboard
Warnings are being emitted if you have multiple fragments of the same name for different servers
Warning: fragment with name Cake already exists.
graphql-tag enforces all fragment names across your application to be unique; read more about
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names
My application is communicating with different graphql servers, their graphs are not related but they use similarly named types and fields, leading to similarly named fragments.
Is there a mechanism to scope the detection so that fragment "Cake" for server A doesn't generate a warning when there's a fragment "Cake" for server B?
I can work around it by renaming the fragments (CakeA, CakeB) which is less than ideal but I'm wondering if that's a use case that's been thought over.
Calling disableFragmentWarnings(); is undesirable as I still want to be warned if 2 fragments named "Cake" are both defined for the same server.