Search⌘ K
AI Features

Adding Fields in GraphQL Schema

Explore adding scalar fields such as id, name, and description to GraphQL object types using the field macro in Absinthe. Understand basic schema modifications in Elixir and how to verify these changes with runtime commands.

We'll cover the following...

Adding fields

We can add fields to an object type using the field macro. The macro takes an identifier atom, a type reference, an optional keyword list of attributes, and another optional block for more in-depth configuration We’ll start with the basics and add :id, :name, and :description fields to our ...