-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
new GraphQLError(
`Field "${fieldDef.name}" argument "${argDef.name}" of type "${argTypeStr}" is required, but it was not provided.`,
{ nodes: fieldNode },
),The error messages should, in some way, be customizable and i18n friendly. Typically, an express or koa service uses the 'Accept-Language' header to determine the message language,
const locale = ctx.get( 'accept-language' ) || 'en-US';Using npm packages i18next, i18n or nanostores/i18n a message is ultimately rendered in the following way,
i18nMessage( locale, messageKey, { fieldDefName, argDefName, argTypeStr });Customizing error messages is mostly impractical at the moment due to overly complicated work-arounds needed.
dimaMachina
Metadata
Metadata
Assignees
Labels
No labels