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

Why a GraphQL endpoint rather than a schema file? #2

Closed
njlr opened this issue Jul 9, 2020 · 3 comments
Closed

Why a GraphQL endpoint rather than a schema file? #2

njlr opened this issue Jul 9, 2020 · 3 comments

Comments

@njlr
Copy link
Contributor

njlr commented Jul 9, 2020

Why does the tool require a running endpoint or the output of the introspection query?

Wouldn't the GraphQL schema be enough?

This would make the build process simpler.

@Zaid-Ajaj
Copy link
Owner

Zaid-Ajaj commented Jul 9, 2020

Why does the tool require a running endpoint or the output of the introspection query?

Because a lot of the times you don't have control of the schema and you only have a running GraphQL backend

Wouldn't the GraphQL schema be enough?

Actually, if you have you a schema file definition, then that can be your input for the schema configuration. Just put the schema definition in a file with a .gql or .graphql extension and point the schema config to that file:

{
   "schema": "./schema-definition.gql" 
}  

Maybe I forgot to actually document that part 🤔

@njlr
Copy link
Contributor Author

njlr commented Jul 10, 2020

Makes sense!

PR for the docs: #5

@Zaid-Ajaj
Copy link
Owner

Fixed and the docs are now in the README

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