Moving On

In this chapter, you’ve learned a lot about how to model the input types that users can provide as arguments, and how Absinthe uses the schema to automatically enforce the constraints for you.

Before you move on, here are a couple of challenges for you to look at:

  1. We built out a full example using input objects and enums for the :menu_items field. Add a :categories field that supports filtering by name and also supports ordering.
  2. Build a custom scalar type that accepts valid email addresses and parses them into {username, domain} tuples, then serializes tuples back out as email addresses. Just use a simple check when parsing the email address; this isn’t about crafting the perfect regular expression.

In the next chapter, you’ll learn how to better organize your schema and use abstract types to model relationships that will make your GraphQL documents more flexible and reusable.

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

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