neuron v4.0.0 Neuron.Fragment View Source

This module can be used to register fragments to be used in your GraphQL queries

Link to this section Summary

Functions

registers a fragment that will automatically be added to future mutations and queries that require it

Link to this section Functions

Link to this function

register(query_string)

View Source
register(query_string :: String.t()) :: :ok

registers a fragment that will automatically be added to future mutations and queries that require it

Example

iex> Neuron.Fragment.register("
...>  NameParts on Person {
...>    firstName
...>    lastName
...>  }
...> ")
:ok
Link to this function

register(context, query_string)

View Source
register(context :: :global | :process, query_string :: String.t()) :: :ok