primait/elm-graphql-client/1.1.0

GraphqlClient.Model

The Model

resetPipeline : Model name decodesTo msg -> Model name decodesTo msg

Resets the requests pipeline

removeQueryFromPipeline : QueryId -> Model name decodesTo msg -> Model name decodesTo msg

Removes a query from the pipeline

type alias Authentication =
( HeaderName, HeaderValue )

Represent an authentication header

type Model name decodesTo msg

The component model

type Msg name decodesTo
= FirstAttemptFinished
QueryId
name
(RemoteData (Error decodesTo) decodesTo)
| SecondAttemptFinished
QueryId
name
(RemoteData (Error decodesTo) decodesTo)

The Msg

type PipelineElement name decodesTo
= Query name (SelectionSet decodesTo RootQuery)
| Mutation name (SelectionSet decodesTo RootMutation)

A pipeline element

type alias QueryId =
Int

Query id

( QueryId, PipelineElement name decodesTo )
-> Model name decodesTo msg
-> Model name decodesTo msg

Adds an element to the current pipeline

getAuthenticationErrorIdentifier : Model name decodesTo msg -> List GraphqlError -> Bool

Gets the error identifier

Model name decodesTo msg
-> List ( QueryId, PipelineElement name decodesTo )

Gets pipeline elements

getMsgLifter : Model name decodesTo msg -> Msg name decodesTo -> msg

Gets the message lifter

getPipelineElementName : PipelineElement name decodesTo -> name

Gets the name of a pipeline element

getUrl : Model name decodesTo msg -> String

Gets the client url

initialize : String -> (Msg name decodesTo -> msg) -> Model name decodesTo msg

Initialize the model