Grapix v0.2.1 Grapix.GraphqlOps View Source

Utilities for manipulating GraphQL documents.

Link to this section Summary

Functions

Execute an executable GraphQL document against the specified schema. As a convenience, atom keys in the vars map are morphified into string keys.

Validates an executable GraphQL document against the specified schema. Validation includes verifying the presence and types of input variables.

Link to this section Functions

Link to this function

execute(query_spec, opts \\ [])

View Source
execute(Grapix.QuerySpec.t(), [keyword()]) :: {:ok | :error, any()}

Execute an executable GraphQL document against the specified schema. As a convenience, atom keys in the vars map are morphified into string keys.

Link to this function

validate_query_spec(query_spec, vars \\ %{})

View Source
validate_query_spec(Grapix.QuerySpec.t(), %{}) :: {:ok | :error, any()}

Validates an executable GraphQL document against the specified schema. Validation includes verifying the presence and types of input variables.