Skip to content
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 imports #12

Open
kbrandwijk opened this issue Dec 22, 2017 · 5 comments
Open

Support schema imports #12

kbrandwijk opened this issue Dec 22, 2017 · 5 comments

Comments

@kbrandwijk
Copy link
Member

It would be great if the datasource boilerplate would include support for import statements in schemas. See https://github.com/graphcool/graphql-import for details.

This could be a build step (using the graphql-cli bundle command) or a run-time step (using importSchema().

@jlengstorf
Copy link
Member

We ran into some issues with this previously. @ryanomackey was trying to get importSchema() working, and it kept throwing errors. We ended up moving on to other work and haven't revisited this.

That being said, I'd love to have support for it. Any chance you've got time to put together a PR?

@kbrandwijk
Copy link
Member Author

Would you want this compile-time or run-time?

@jlengstorf
Copy link
Member

It would need to work with the gramps dev command (which transpiles code). As long as the CLI still works, I don't have a strong preference.

@jlengstorf
Copy link
Member

Relevant code for transpilation in the CLI:

https://github.com/gramps-graphql/gramps-cli/blob/master/lib/data-sources.js#L122-L143

@kbrandwijk
Copy link
Member Author

There you go... ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants