coerceInSchemaContextOrThrow
fun GQLValue.coerceInSchemaContextOrThrow(expectedType: GQLType, schema: Schema): GQLValue
Content copied to clipboard
For a GQLValue used in input position, validate that it can be coerced to expectedType and coerce it at the same time.
This should only be used in places where no variables are available. For an example:
field argument defaultValue (schema)
input field defaultValue (schema)
directive argument values