You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where I need my GraphQL schema (composed using this library) to keep all unused types in the schema when I run buildSchema().
The only way I can see to achieve this is by adding the types I want to a "keep" list with addSchemaMustHaveType. The problem with this is that only those types that are explicitly added with this method are kept, whereas I want all types to be kept (some of which already exist in the initial schema).
I was looking to create a PR to help with this, but was unsure where would be the best to do it in the current architecture - ExtraSchemaConfig does not feel like an appropriate interface to extend since it is essentially a proxy to GraphQLSchemaConfig.
I'd love to help, but don't want to jump in just yet! Maybe this does not require a code solution at all?
The text was updated successfully, but these errors were encountered:
Feel free to extend ExtraSchemaConfig with a new additional option (eg. keepAllTypes: true or addAllTypes: true or any another better name on your choice). Just extract this option in SchemaComposer.buildSchema before passing rest options to graphql.buildSchema.
I have a use case where I need my GraphQL schema (composed using this library) to keep all unused types in the schema when I run
buildSchema()
.The only way I can see to achieve this is by adding the types I want to a "keep" list with
addSchemaMustHaveType
. The problem with this is that only those types that are explicitly added with this method are kept, whereas I want all types to be kept (some of which already exist in the initial schema).I was looking to create a PR to help with this, but was unsure where would be the best to do it in the current architecture -
ExtraSchemaConfig
does not feel like an appropriate interface to extend since it is essentially a proxy to GraphQLSchemaConfig.I'd love to help, but don't want to jump in just yet! Maybe this does not require a code solution at all?
The text was updated successfully, but these errors were encountered: