Packages
graphqexl
0.1.0-alpha-rc.23
0.1.0
0.1.0-alpha-rc.docs-test-6
0.1.0-alpha-rc.docs-test-5
0.1.0-alpha-rc.docs-test-4
0.1.0-alpha-rc.docs-test-3
0.1.0-alpha-rc.docs-test-2
0.1.0-alpha-rc.docs-test
0.1.0-alpha-rc.25
0.1.0-alpha-rc.24
0.1.0-alpha-rc.23
0.1.0-alpha-rc.22
0.1.0-alpha-rc.21
0.1.0-alpha-rc.20
0.1.0-alpha-rc.19
0.1.0-alpha-rc.18
0.1.0-alpha-rc.17
0.1.0-alpha-rc.16
0.1.0-alpha-rc.15
0.1.0-alpha-rc.14
0.1.0-alpha-rc.13
0.1.0-alpha-rc.12
0.1.0-alpha-rc.11
0.1.0-alpha-rc.10
0.1.0-alpha-rc.9
0.1.0-alpha-rc.8
0.1.0-alpha-rc.7
0.1.0-alpha-rc.6
0.1.0-alpha-rc.5
0.1.0-alpha-rc.4
0.1.0-alpha-rc.3
0.1.0-alpha-rc.2
0.1.0-alpha-rc.1
0.1.0-alpha.rc-4
0.1.0-alpha.rc.4
Fully-loaded, pure-Elixir GraphQL server implementation with developer tools
Current section
Files
Jump to
Current section
Files
lib/graphqexl/schema/interface.ex
alias Graphqexl.Schema.Ref
defmodule Graphqexl.Schema.Interface do
@moduledoc """
GraphQL Interface, encapsulating a group of fields to be shared between types
"""
defstruct(
deprecated: false,
deprecation_reason: "",
description: "",
extend: nil,
fields: %{},
name: "",
on: []
)
@type t ::
%Graphqexl.Schema.Interface{
deprecated: boolean,
deprecation_reason: String.t,
description: String.t,
name: String.t,
fields: Map.t,
on: list(Map.t),
extend: Ref.t | nil
}
@doc """
Lists the available fields on the given interface.
Returns: `[t:Graphqexl.Schema.Field.t/0]`
"""
@doc since: "0.1.0"
@spec fields(Graphqexl.Schema.Interface.t) :: list(Graphqexl.Schema.Field.t)
def fields(interface) do
# TODO: handle extended interfaces
interface.fields
end
end