Dark Mode

User-defined types (UDTs) can be created as GraphQL object types.UDTs are optional, but if you wish to use a UDT in another object type definition,you'll want to create the UDT first.Once created, you can include the type in the schema deployed via the GraphQL playground.

Prerequisites

Here are two examples that create a UDT called Address that includes a street, city, state, and zipcode,and a UDT called Review that includes a book title, comment, rating and review data.

Directives in example: