-
-
Notifications
You must be signed in to change notification settings - Fork 820
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 schema AST as type definition #300
Support schema AST as type definition #300
Conversation
The array test is already covered in the next test
Ok, coveralls is just awesome 👍 |
Thanks for the PR @jamiter! There might be a nicer way without the extra print, but I think this is good enough and a smaller change, so I'll merge it! 🙂 |
Awesome, thanks! |
Nice! I wake up every morning with excitement to run |
Ok I have a question and need help for this, How can I use this on server mode? When I trying to use this great solution I catch the next error:
Looks easy but I don't know how to. Thanks for your support! |
This fix doesn't appear to be able to handle comments in .graphql files. I see this error when I have a line that is commented out with a # character:
|
@chrisl777, we should be able to add a test to check that. Could you make a PR for it? I'm a bit short on time at the moment. |
@jamiter @chrisl777 Any update on this? Does this fix actually work? |
I have not had any time to check. Anyone else have a chance to play with it? |
What's wrong with my graphql file? I think nodejs regard it as a js file. |
TODO:
The webpack loader and the Meteor build plugin both return a schema AST when importing a
.graphql
file. It would be great to simply pass this to themakeExecutableSchema
function without first having to print it.This PR makes sure that no needless print and parsing is done when an AST is passed. If an Array is passed it will print every AST it finds so that it can be combined with passed schema strings.
See #273 (comment)
Example: