-
Notifications
You must be signed in to change notification settings - Fork 62
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
Support for imports #80
Comments
I just found out that this is already working, if you pass a glob the library will concatenate all the files :) graphql-schema-linter/src/configuration.js Lines 33 to 62 in 55bdcd4
|
@patrick91 how exactly did you get it working? i'm trying
However, adding Seems there's no way to make both tools happy at the moment :-/ |
I can't find that codebase anymore, but I'm quite sure I didn't define multiple root queries :) |
Hi, I've tried running graphql-schema-linter on multiple files with the latest version of graphql but the linting breaks with this error:
Which seems to be caused by this: graphql/graphql-js#1124
My workaround was to merge all the files with AWK and lint the merged schema,
awk 'FNR==1{print ""}1' ../api/**/*.graphql | graphql-schema-linter .graphql -s
I'm not sure what the best solution to fix this will be, I know there is no official syntax for imports, but there are two "proposal":
I think add some kind of imports support would be great, the only issue is that we still have the error from above, since now the GraphQL library needs a root type. Another solution would be do merge (like I did with the awk) all the files and run the validation on it. Then we need to a mapping between the merged file and the original ones, but shouldn't be difficult :)
What do you think? I might have some time to help this or the next week
The text was updated successfully, but these errors were encountered: