GraphQL is all about types, the query language is basically about selecting fields on objects.
GraphQLBundle support the use of FQN of classes to set types.
/** * @GraphQL\Field(type="App\Entity\User") */ protected $author;
is similar to:
/** * @GraphQL\Field(type="User") */ protected $author;
Type names should be unique in the entire schema
List & NonNull
You can apply additional type modifiers that affect validation of those values.
Let's look at an example:
/** * @GraphQL\Field(type="[App\Entity\Category]") */ protected $categories;
We can use a type modifier to mark a type as a List, which indicates that this field will return an array of that type.
In the schema language, this is denoted by wrapping the type in square brackets, [ and ].
A type can be marked as Non-Null by adding an exclamation mark, ! after the type name
/** * @GraphQL\Field(type="App\Entity\User!") */ protected $author;
Read more information about List & NonNull