To view this content, buy the book! 😃🙏
Or sign in if you’ve already purchased.
All named types can be extended in some way. We might extend types when we’re defining our schema across multiple files, or if we’re modifying a schema defined by someone else. Here are a couple examples:
type Query { messages: [String] } type Direction { NORTH EAST SOUTH WEST }
extend type Query { lastMessage: String } extend enum Direction { SOUTHEAST SOUTHWEST NORTHEAST NORTHWEST }
First we add a root query field, and then we add four more possible values for the Direction enum.
Direction