Skip to main content

validateInputLiteral

Callable

  • validateInputLiteral(valueNode: ValueNode, type: GraphQLInputType, onError: (error: GraphQLError, path: readonly (string | number)[]) => void, variables?: Maybe<VariableValues>, fragmentVariableValues?: Maybe<VariableValues>, hideSuggestions?: Maybe<boolean>): void

  • Validate that the provided input literal is allowed for this type, collecting all errors via a callback function.

    If variable values are not provided, the literal is validated statically (not assuming that those variables are missing runtime values).


    Parameters

    • valueNode: ValueNode
    • type: GraphQLInputType
    • onError: (error: GraphQLError, path: readonly (string | number)[]) => void
      • optionalvariables: Maybe<VariableValues>
      • optionalfragmentVariableValues: Maybe<VariableValues>
      • optionalhideSuggestions: Maybe<boolean>

      Returns void