graphqexl v0.1.0-alpha-rc.25 Graphqexl.Schema.Executable
Establishes a GenServer
to cache the loadedGraphQL schema.
Future improvement: use the GenServer as a basis for hot-reloading
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Handle request messages from external processes for a :get
operation,
returning the executable schema. Callback for the GenServer's call
handling.
Loads, parses and uses :ets
to cache the configured schema definition.
Starts the schema cache. Triggers the GenServer.init/1
callback and blocks until the callback
returns. Returns a tuple with contents dependent on the success state of this function and the
GenServer.init/1
callback.
Link to this section Functions
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
handle_call(msg, arg2, state)
(since 0.1.0)handle_call(:get, tuple(), term()) :: Graphqexl.Schema.t()
Handle request messages from external processes for a :get
operation,
returning the executable schema. Callback for the GenServer's call
handling.
Returns: Graphqexl.Schema.t/0
Loads, parses and uses :ets
to cache the configured schema definition.
GenServer.init/1
callback implementation, called at application bootstrap.
Returns:
{:ok, nil}
when successful
{:error, t:String.t/1}
when unsuccessful
start_link(init_arg)
Starts the schema cache. Triggers the GenServer.init/1
callback and blocks until the callback
returns. Returns a tuple with contents dependent on the success state of this function and the
GenServer.init/1
callback.
Returns
{:ok, pid}
When successful, where `pid` is the resulting process
{:error, {:already_started, pid} | term}
When there is an error. If there is already a process for this application, the first key will
be `:already_started` and `pid` will be the existing process.
:ignore
When this child should be ignored by the containing supervisor tree