prisma-archive / graphql-transform-schema

Transform, filter & alias resolvers of a GraphQL schema

Home Page:https://example-rakllksfme.now.sh/graphiql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

transformSchema removes directives

kbrandwijk opened this issue · comments

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.