fields. Each field returns data of the
typespecified. Every type definition in a GraphQL schema belongs to one of the following categories:
Inta signed 32‐bit integer
Floata signed double-precision floating-point value
Stringa UTF‐8 character sequence
Booleantrue or false
ID(serialized as a
String) a unique identifier that's often used to refetch an object or as the key for a cache. Although it's serialized as a String, an ID is not intended to be human‐readable.
fields, each of which has its own
type. Two object types can include each other as fields.
Querytype is a special object type that defines all of the top-level entry points for queries that clients execute against a server. Each field of the Query type defines the name and return type of a different entry point.
Mutationtype is similar in structure and purpose to the Query type. Whereas the Query type defines entry points for read operations, the Mutation type defines entry points for
writeoperations. This type is optional. Each field of the Mutation type defines the signature and return type of a different entry point.
Inputtypes are special object types that allow you to provide hierarchical data as arguments to fields (as opposed to providing only flat scalar arguments). Each field of an input type can be only a scalar, an enum, or another input type.
Enumis similar to a scalar type, but its legal values are defined in the schema. Enums are most useful in situations where the user must pick from a prescribed list of options.
Uniontype declares which object types are included in the union. A field can have a union (or a list of that union) as its return type. In this case, it can return any object type that's included in the union.
subscriptionTypedefine the names of fields that contain list of corresponding queries supported by an application. In other words, if the
QueryRootyou can find all supported the Query types inside the element of the
typescontains all supported variables and queries.
Userobject and the
allUsersquery that returns the list of
Content-Typeheader to get CSRF:
GETrequests instead of
POSTones to get CSRF.