graphql-middleware
graphql-middleware copied to clipboard
Add ability to mutate schema in-place
Currently graphql-middleware
uses @graphql-tools/schema
package to actually apply schema modifications to the initially provided one (via addResolversToSchema
function). Here https://github.com/maticzav/graphql-middleware/blob/8dc4590a421feff4a1455b1cf672cb10798c66c8/src/middleware.ts#L45
it hard-codes addResolversToSchema
to always produce a new schema. I'd like to make it configurable, so I can decide whether the initial schema should be modified in-place or a new one should be generated.
This option would allow to hack around https://github.com/graphql-nexus/nexus/issues/959 issue.