graphql-middleware icon indicating copy to clipboard operation
graphql-middleware copied to clipboard

Add ability to mutate schema in-place

Open roman-vanesyan opened this issue 3 years ago • 0 comments

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.

roman-vanesyan avatar Jul 28 '21 20:07 roman-vanesyan