absinthe v1.4.0-beta.1 Absinthe.Type.Directive View Source

Used by the GraphQL runtime as a way of modifying execution behavior.

Type system creators will usually not create these directly.

Link to this section Summary

Types

t()

A defined directive

Functions

Callback implementation for c:Absinthe.Introspection.Kind.kind/0

Link to this section Types

Link to this type location() View Source
location ::
  :query |
  :mutation |
  :field |
  :fragment_definition |
  :fragment_spread |
  :inline_fragment
Link to this type t() View Source
t() :: %{name: binary, description: binary, args: map, locations: [location], expand: nil | (Absinthe.Blueprint.node_t, map -> {Absinthe.Blueprint.t, map}), instruction: (map -> atom), __reference__: Absinthe.Type.Reference.t}

A defined directive.

  • :name - The name of the directivee. Should be a lowercase binary. Set automatically.
  • :description - A nice description for introspection.
  • :args - A map of Absinthe.Type.Argument structs. See Absinthe.Schema.Notation.arg/1.
  • :locations - A list of places the directives can be used.
  • :instruction - A function that, given an argument, returns an instruction for the correct action to take

The :__reference__ key is for internal use.

Link to this section Functions

Callback implementation for c:Absinthe.Introspection.Kind.kind/0.