Skip to main content

GraphQL– Optional arguments

Every field on a GraphQL object type can have zero or more arguments, for example the length field below:

An argument can be either required or optional. For optional arguments, you can specify a default value, like  METER in the example above.

To configure this using HotChocolate, you can use the following syntax: