Skip to main content

InvalidArgumentsExtensions

API Docs


Type Alias: InvalidArgumentsExtensions

InvalidArgumentsExtensions = object

Defined in: src/utilities/TalawaGraphQLError.ts:141

When the client provides invalid arguments in a graphql operation.

Example​

throw new TalawaGraphQLError({
extensions: {
code: "invalid_arguments",
issues: [
{
argumentPath: ["input", "age"],
message: "Must be greater than 18.",
},
{
argumentPath: ["input", "username"],
message: "Must be smaller than or equal to 25 characters.",
},
{
argumentPath: ["input", "favoriteFood", 2],
message: "Must be at least 1 character long.",
},
],
},
});

Properties​

code​

code: "invalid_arguments"

Defined in: src/utilities/TalawaGraphQLError.ts:142


issues​

issues: object[]

Defined in: src/utilities/TalawaGraphQLError.ts:143

argumentPath​

argumentPath: JSONArgumentPathKey[]

message​

message: string