graphqexl v0.1.0-alpha-rc.24 Graphqexl.Query.ResultSet

Result of a GraphQL Graphqexl.Query.t/0 operation, including any errors

Link to this section Summary

Functions

Filter the given Graphqexl.Query.ResultSet.t/0 to the Treex.Tree.t/0 of fields specified.

Validate that a given Graphqexl.Query.ResultSet.t/0 conforms to the given Graphqexl.Schema.t/0 and is therefore fine to serialize and return in an HTTP response.

Link to this section Types

Link to this type

t()

t() :: %Graphqexl.Query.ResultSet{data: Map.t(), errors: Map.t()}

Link to this section Functions

Link to this function

filter(result_set, fields)

(since 0.1.0)
filter(t(), Treex.Tree.t()) :: t()

Filter the given Graphqexl.Query.ResultSet.t/0 to the Treex.Tree.t/0 of fields specified.

Returns: Graphqexl.Query.ResultSet.t/0

Link to this function

validate!(result_set, schema)

(since 0.1.0)
validate!(t(), Graphqexl.Schema.t()) :: t()

Validate that a given Graphqexl.Query.ResultSet.t/0 conforms to the given Graphqexl.Schema.t/0 and is therefore fine to serialize and return in an HTTP response.

Returns: Graphqexl.Query.ResultSet.t/0 (for chainability)