harmboschloo / graphql-to-elm-package / GraphQL.Batch

Batch operations together.

batch (\a b c -> ( a, b, c ))
    |> query operation1
    |> query operation2
    |> mutation operation3

Batch


type Batch e a

batch : (a -> b) -> Batch e (a -> b)

query : GraphQL.Operation.Operation GraphQL.Operation.Query e a -> Batch e (a -> b) -> Batch e b

mutation : GraphQL.Operation.Operation GraphQL.Operation.Mutation e a -> Batch e (a -> b) -> Batch e b

Mapping

map : (a -> b) -> Batch e a -> Batch e b

Convert the batch data value.

mapError : (e1 -> e2) -> Batch e1 a -> Batch e2 a

Convert the batch error value.

JSON

encode : Batch e a -> Json.Encode.Value

Encode the batch operations for a request.

decoder : Batch e a -> Json.Decode.Decoder (Result e a)

Decoder for the response of a batch request.