primait / elm-graphql-client / 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 (Graphql.Http.Error decodesTo) decodesTo)
    | SecondAttemptFinished QueryId name (RemoteData (Graphql.Http.Error decodesTo) decodesTo)

The Msg


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

A pipeline element


type alias QueryId =
Basics.Int

Query id

addElementToPipeline : ( 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 Graphql.Http.GraphqlError.GraphqlError -> Basics.Bool

Gets the error identifier

getElementsInPipeline : 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