We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@nexus/schema
makeSchema
should never produce schemas that will never run
fill the empty objects with a placeholder field, e.g.
object Something { """This object is empty in your schema. Nexus has added this field for you. In production [...]""" todo: Boolean }
should expose a way for consumer to configure the field. Should pass some data for consumer to make useful log messages.
makeSchema({ on: { emptyObject: (object: GraphQLObjectType) => { type: 'remove' } | { type: 'placehold', fieldName?: string, fieldType?: string, heredoc?: string } } })
default: fail in prod, warn in dev
nexus
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Perceived Problem
@nexus/schema
will tolerate empty objectsmakeSchema
leads to invalid schemas that won't be caught until runtimeIdeas / Proposed Solution(s)
@nexus/schema
should never produce schemas that will never run
fill the empty objects with a placeholder field, e.g.
should expose a way for consumer to configure the field. Should pass some data for consumer to make useful log messages.
default: fail in prod, warn in dev
nexus
@nexus/schema
to placehold during dev but remove and error during prodThe text was updated successfully, but these errors were encountered: