InputObject

Description

Defines a set of input fields; the input fields are either scalars, enums, or other input objects. This allows arguments to accept arbitrarily complex values.

Absinthe Macro

input_object

Examples

In an Absinthe schema:

​ @desc ​"​​Profile information to modify"​
​ input_object ​:profile_input​ ​do​
​  field ​:name​, non_null(​:string​)
​  ​# Other fields​
​ ​end​

Get Craft GraphQL APIs in Elixir with Absinthe now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.