The TodoItem and TodoItemInput classes were aimed at giving us schemas that describe the fields, types, and arguments. While they are an important part of our GraphQL jigsaw, we have a missing piece—the ability to execute functions against our GraphQL server.
We need a way to resolve the fields of our types. With GraphQL, a resolver is something that represents a single field. It fetches the data that we need, effectively giving the GraphQL server detailed instructions on how to convert queries into data items (we can think of this as one of the reasons why we have separate schemas for mutating data over querying data—we cannot mutate fields using the same logic as querying fields). From this, we can work out ...