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

transformSchema removes directives #5

Open
kbrandwijk opened this issue Oct 26, 2017 · 3 comments
Open

transformSchema removes directives #5

kbrandwijk opened this issue Oct 26, 2017 · 3 comments

Comments

@kbrandwijk
Copy link

See apollographql/apollo-server#643 for more details.

@kbrandwijk
Copy link
Author

I think this might be caused by the fact that a new schema is created, instead of manipulating the schema that is passed in. https://github.com/graphcool/graphql-transform-schema/blob/master/src/index.ts#L18

@schickling
Copy link
Contributor

Good catch @kbrandwijk. Would you mind creating a PR that additionally copies the directives as well?

@kbrandwijk
Copy link
Author

@schickling I think it's a bit more than that, because if you specify any custom directive in your schema, it doesn't automatically show up in the schema.getDirectives() result.

I think the necessary refactoring is to not create a new schema, but I'm not 100% sure how.

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

No branches or pull requests

2 participants