-
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
Feature request: Allow to import specific fragment from .graphql file with many fragments #102
Comments
Not stated above - I beileve it's not possible to do this today because spec-compliant graphql servers will complain about unused fragments. Alternatively, what if the loader checked for the validity of the graphql queries/fragments and removed unused fragments? |
+1. Maybe we can just use ES6 style fragment userInfo on UserInfo {
# some fileds
}
fragment communityUserInfo on UserInfo {
# some fileds
} then #import { userInfo } from './userInfo.gql' |
sounds like a fairly reasonable extension of the feature introduced in 2.6.0 to export multiple operations from a graphql document happily accepting PRs, that PR should help make this easy! |
What is the status of this issue? Is the idea abandoned? |
i generally think that this should be subsumed by integrating with efforts like graphql-import which have better support for some of the things mentioned above, rather than building our own version of this stuff in this library. |
@jnwng, thanks for a fast reply 👍 |
I've submitted PR #257 to address this, please take a look. |
In some cases, it would be great to be able to import a specific fragment when defined in a .graphql file alongside with other fragments.
At the moment, only two solutions are available:
The text was updated successfully, but these errors were encountered: