jamesmacaulay/elm-graphql/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

GraphQL.Request.Builder.Arg

The functions in this module let you construct argument values that you can pass to fields and directives using the functions in GraphQL.Request.Builder.

type Value variableSource

An argument value, which might be either a constant or a variable. The variableSource parameter is the type of Elm value that variables will extract their values from.

variable : Variable variableSource -> Value variableSource

Construct a variable argument value.

int : Int -> Value variableSource

Construct a constant GraphQL Int argument value from an Elm Int.

float : Float -> Value variableSource

Construct a constant GraphQL Float argument value from an Elm Float.

string : String -> Value variableSource

Construct a constant GraphQL String argument value from an Elm String.

bool : Bool -> Value variableSource

Construct a constant GraphQL Boolean argument value from an Elm Bool.

true : Value variableSource

The GraphQL true value.

false : Value variableSource

The GraphQL false value.

null : Value variableSource

The GraphQL null value.

object : List ( String, Value variableSource ) -> Value variableSource

Constructs a GraphQL Input Object value from a list of key-value pairs.

list : List (Value variableSource) -> Value variableSource

Constructs a GraphQL List from an Elm List of Values.

getAST : Value variableSource -> ArgumentValue

Returns the AST (abstract syntax tree) representation of a Value.

getVariables : Value variableSource -> List (Variable variableSource)

Returns a List of any Variables used in the given Value.