Chapter 2
Building a Schema

GraphQL APIs are shaped by their schemas. In fact, it’s fair to say that because GraphQL schemas are more than just structural metadata and actually define behavior, they’re the API implementation itself.

The schema is used by GraphQL servers as the canonical source of information when deciding how to respond to a request. They’re the reason that GraphQL documents can be as flexible as they are, while still giving backend developers the mechanisms that they need to ensure the API is safe and reliable.

In Elixir, you can use the Absinthe package to build GraphQL APIs. In this chapter, we’ll help you get acquainted with how Absinthe’s schemas are defined by building the foundation of our example application, PlateSlate. The knowledge you’ll pick up in this chapter will serve as the foundation for the rest of the book.

First, let’s kick the tires on our example application, making sure it’s up and running and ready for a GraphQL API.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.166.149