/
Summary
Summary of the Type System chapter
To view this content, buy the book! 😃🙏
Or if you’ve already purchased.
Summary
To recap the GraphQL type system, the schema defines the capabilities of a GraphQL server. It is made up of type and directive definitions, which consist of values or fields and their types and arguments. Types, fields, arguments, and enum values can all have descriptions—strings provided to introspection queries.
There are six named types:
- Scalars are primitive values.
- Enums have a defined set of possible values.
- Objects have a list of fields.
- Input objects are objects that can be used as arguments.
- Interfaces have a list of fields that all implementing objects must include.
- Unions are a list of object types.
And there are two wrapping types:
Schema directives define directives that can be used in query documents. Types can be extended after they’re defined. And GraphQL servers can have introspection turned on, which enables two specific root Query fields that return information about the schema.