GraphQL v0.2.0 GraphQL.Execution.Executor
Execute a GraphQL query against a given schema / datastore.
# iex> GraphQL.execute(schema, "{ hello }")
# {:ok, %{hello: "world"}}
Summary
Types
context :: %{schema: GraphQL.Schema.t, fragments: struct, root_value: Map, operation: Map, variable_values: Map, errors: [GraphQL.Error.t]}
operation :: %{kind: :OperationDefintion, operation: atom}
result_data :: {:ok, Map}
Functions
Specs
execute(GraphQL.Schema.t, GraphQL.Document.t, map, map, String.t) ::
result_data |
{:error, %{errors: list}}
Execute a query against a schema.
# iex> GraphQL.execute(schema, "{ hello }")
# {:ok, %{hello: world}}