absinthe v1.2.0-alpha.1 Absinthe.Type.InputObject

Defines a GraphQL input object

Input objects enable nested arguments to queries and mutations.

Example

mutation do
  field :user, :user do
    arg :name, :string
    arg :contact, non_null(:contact)

    resolve &User.create/2
  end
end

input_object :contact do
  field :email, :string
end

This supports the following mutation:

mutation CreateUser {
  user(contact: {email: "foo@bar.com"}) {
    id
  }
}

Summary

Types

t :: %{name: binary, description: binary, fields: map | (() -> map), __reference__: Absinthe.Type.Reference.t}

Functions

build(map)
fetch(container, key)
kind()