dillonkearns/elm-graphql/1.5.1

NOTE: the latest version is 5.0.12

Graphql.Internal.Encode

WARNING Graphql.Interal modules are used by the @dillonkearns/elm-graphql command line code generator tool. They should not be consumed through hand-written code.

Graphql.Internal.Encode.Values are low-level details used by generated code. They are only used by the code generated by the @dillonkearns/elm-graphql CLI tool.

Encode null

bool : Bool -> Value

Encode a bool

enum : (a -> String) -> a -> Value

Encode an enum. The first argument is the toString function for that enum.

int : Int -> Value

Encode an int

list : (a -> Value) -> List a -> Value

Encode a list of Values

string : String -> Value

Encode a string

object : List ( String, Value ) -> Value

Encode a list of key-value pairs into an object

maybe : (a -> Value) -> Maybe a -> Value

Encode a Maybe. Uses encoder for Just, or Encode.null for Nothing.

maybeObject : List ( String, Maybe Value ) -> Value

Encode a list of key-value pairs into an object

optional : OptionalArgument a -> (a -> Value) -> Maybe Value

Encode a list of key-value pairs into an object

float : Float -> Value

Encode a float

serialize : Value -> String

Low-level function for serializing a Graphql.Internal.Encode.Values.

type Value

Represents an encoded Value