We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Our graphql systems support an #import directive in graphql files to allow sharing fragments between operations in different files.
#import
e.g.
#import './TeacherProfileUser.fragment.graphql' #import './ProfileSettingsContainer/ProfileSettings/StandardsPreferences/StandardsPreferences.fragment.graphql' #import "../../core/viewer.fragment.graphql" mutation TeacherProfileUpdateUser($userId: ID!, $input: UserInput!) { updateUser(id: $userId, input: $input) { user { ...TeacherProfileUserFragment ...StandardsPreferencesUserFragment ...ViewerFragment } } }
Currently this file gives an error:
/home/ubuntu/app/src/ui/client/teacher/profile/TeacherProfile.mutation.graphql 8:12 error Unknown fragment "TeacherProfileUserFragment" @graphql-eslint/known-fragment-names 9:12 error Unknown fragment "StandardsPreferencesUserFragment" @graphql-eslint/known-fragment-names 10:12 error Unknown fragment "ViewerFragment" @graphql-eslint/known-fragment-names
It would be nice if this support could be ported over to this linter somehow.
The text was updated successfully, but these errors were encountered:
Stumbled upon the same problem, support for imports would be greatly appreciated
Sorry, something went wrong.
@oliverlukesch For now you can provide your operations under parserOptions like below;
parserOptions
{ "parserOptions": { "operations": "/path/to/operations/*.graphql" } }
known-fragment-names
Successfully merging a pull request may close this issue.
Our graphql systems support an
#import
directive in graphql files to allow sharing fragments between operations in different files.e.g.
Currently this file gives an error:
It would be nice if this support could be ported over to this linter somehow.
The text was updated successfully, but these errors were encountered: