-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[graphql-tag/loader] Allow importing named fragments in .graphql #251
Comments
Dupe of #102 ? |
Can anyone tell me how I get this to work? I can't find specific documentation on it. I have queries in GQL files in which I have fragments which are also used in other gql query files.
I need to import a specific fragment from my how do I use es6 js import statement inside the gql files? |
You can't use es6 import in gql files. Some GraphQL setups do allow another kind of import, though. |
So importing specific fragments from a .gql file that contains multiple fragments will simply not work as it is right now? And will result in error message?: |
Currently importing fragments in .graphql files imports everything, would be nice to have named imports. The problem is that Apollo Client will send all fragments with request, instead of filtering only what's actually used, eventually it results in server error
Fragment "X" is never used
.As a workaround we can split fragments into very granular files for sure, but it would be nice to have this feature.
The text was updated successfully, but these errors were encountered: