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 extend type #19

Open
guzmo opened this issue Jun 5, 2019 · 4 comments
Open

Support extend type #19

guzmo opened this issue Jun 5, 2019 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@guzmo
Copy link

guzmo commented Jun 5, 2019

Hi,

We have modularized our graphql in to separate files so we extend the queries and mutations, eg.

extend type Query {
  someQuery: Boolean
}

Would it be possible to support this?

@timqian
Copy link
Owner

timqian commented Jun 5, 2019

I have not tried the extend feature yet. But this tool use graphql-js to parse schema file, as long as graphql-js support it, gql-generator should support it too. But you might need to concat your schemas to one file as gql-generator does not support multiple schema files now

@guzmo
Copy link
Author

guzmo commented Jun 5, 2019

Currently im pushing all to one file and then I run your tool on that file. But the only queries/mutations I get are the ones in the regular Query and Mutation type, not from the extended ones.

@timqian
Copy link
Owner

timqian commented Jun 5, 2019

We use buildSchema method of graphql-js and seems graphql-js is still implementing it

graphql/graphql-js#922 (comment)

it ignores extend for now, and seems it will support it soon.

@timqian
Copy link
Owner

timqian commented Jun 5, 2019

We can add extend support as long as graphql-js support it. PR is welcomed if I forget do it on time

@timqian timqian added enhancement New feature or request help wanted Extra attention is needed labels Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants