Definition

Fields are the individual properties of a GraphQL type.

Each field has a name and a return type.


Basic Example

type User {
  id: ID!
  name: String!
}

Field Types

Fields can return:

Example:

type User {
  id: ID!
  name: String!
  posts: [Post]
}

Field Arguments

Fields can accept arguments (like parameters in functions).