jamesmacaulay / elm-graphql / 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 vars

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

variable : GraphQL.Request.Builder.Variable.Variable vars -> Value vars

Construct a variable argument value.

int : Basics.Int -> Value vars

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

float : Basics.Float -> Value vars

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

string : String -> Value vars

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

bool : Basics.Bool -> Value vars

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

true : Value vars

The GraphQL true value.

false : Value vars

The GraphQL false value.

null : Value vars

The GraphQL null value.

enum : String -> Value vars

Construct a GraphQL Enum value from a String.

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

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

list : List (Value vars) -> Value vars

Constructs a GraphQL List from an Elm List of Values.

getAST : Value vars -> GraphQL.Request.Document.AST.ArgumentValue

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

getVariables : Value vars -> List (GraphQL.Request.Builder.Variable.Variable vars)

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