Adds a detached enum type to the GraphQL schema, listing all possible ErrorCode values and adding messages as a descriptions.
Make sure to add it after EnforceStrictPermissionsPlugin or any other plugin that might filter queries out of the resulting schema.
EnforceStrictPermissionsPlugin
If there is a need to adjust this enum - use GraphQLEnumType postgraphile hook and isErrorCodesEnum scope to find the generated enum. E.g.
GraphQLEnumType
isErrorCodesEnum
builder.hook('GraphQLEnumType', (enumField, _build, context) => { if (context.scope.isErrorCodesEnum === true) { // Modification logic } return enumField; }); Copy
builder.hook('GraphQLEnumType', (enumField, _build, context) => { if (context.scope.isErrorCodesEnum === true) { // Modification logic } return enumField; });
Generated using TypeDoc
Adds a detached enum type to the GraphQL schema, listing all possible ErrorCode values and adding messages as a descriptions.
Make sure to add it after
EnforceStrictPermissionsPlugin
or any other plugin that might filter queries out of the resulting schema.If there is a need to adjust this enum - use
GraphQLEnumType
postgraphile hook andisErrorCodesEnum
scope to find the generated enum. E.g.