transformSchema removes directives
kbrandwijk opened this issue · comments
See apollographql/apollo-server#643 for more details.
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
Good catch @kbrandwijk. Would you mind creating a PR that additionally copies the directives as well?
@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.