[{"name":"GraphqlClient.Client","comment":" This is a Graphql client with automatic retry\n\n@docs authenticationChanged\n@docs manageUpdate\n@docs runMutation\n@docs runQuery\n\n","unions":[],"aliases":[],"values":[{"name":"authenticationChanged","comment":" Function to call when the caller has finished its \"job\" and it's ready to perform the query/mutation again.\nIf there were queries/mutations in pipeline, that were blocked by an authentication problem, they are all returned as a Cmd to be executed.\n\nThe arguments are:\n\n  - the component model\n  - a list of headers (name: String, value: String)\n  - a closure to updater the caller model with the component model. Something like (\\\\gqlClientModel -> {model | gqlClientModel = gqlClientModel})\n  - the caller model\n\n","type":"GraphqlClient.Model.Model name decodesTo msg -> List.List GraphqlClient.Model.Authentication -> (GraphqlClient.Model.Model name decodesTo msg -> model -> model) -> model -> ( model, Platform.Cmd.Cmd msg )"},{"name":"manageUpdate","comment":" This is a function that simplifies the wiring between the caller and the graphql client component.\nIt should be put inside the caller Update cycle.\nThe main purpose is to make it easier for the caller to remember how the integration should be done, by passing arguments to this function.\nIt is not mandatory for this reason, but highly recommended.\n\nThe arguments are:\n\n  - the component message\n  - the component model\n  - the caller Cmd Msg to get a new header\n  - a closure to handle the result of an OK query. The closure should accept the caller model and a decoder for the response\n  - a closure to handle the result of an Error query. The closure should accept the caller model and a Graphql.Http.Error\n  - a closure to updater the caller model with the component model. Something like (\\\\gqlClientModel -> {model | gqlClientModel = gqlClientModel})\n  - the caller model\n\n","type":"GraphqlClient.Model.Msg name decodesTo -> GraphqlClient.Model.Model name decodesTo msg -> Platform.Cmd.Cmd msg -> (model -> name -> decodesTo -> ( model, Platform.Cmd.Cmd msg )) -> (model -> name -> Graphql.Http.Error decodesTo -> model) -> (GraphqlClient.Model.Model name decodesTo msg -> model -> model) -> model -> ( model, Platform.Cmd.Cmd msg )"},{"name":"runMutation","comment":" Function that execute a Graphql mutation\nIt return a tuple with the updated internal model (to be inserted in the caller model) and the Cmd to be executed.\n\nThe arguments are:\n\n  - the mutation name\n  - a list of headers (name: String, value: String)\n  - the component model\n  - the selection set of the query that will be executed\n\n","type":"name -> List.List GraphqlClient.Model.Authentication -> GraphqlClient.Model.Model name decodesTo msg -> Graphql.SelectionSet.SelectionSet decodesTo Graphql.Operation.RootMutation -> ( GraphqlClient.Model.Model name decodesTo msg, Platform.Cmd.Cmd (GraphqlClient.Model.Msg name decodesTo) )"},{"name":"runQuery","comment":" Function that execute a Graphql query\nIt return a tuple with the updated internal model (to be inserted in the caller model) and the Cmd to be executed.\n\nThe arguments are:\n\n  - the query name\n  - a list of headers (name: String, value: String)\n  - the component model\n  - the selection set of the query that will be executed\n\n","type":"name -> List.List GraphqlClient.Model.Authentication -> GraphqlClient.Model.Model name decodesTo msg -> Graphql.SelectionSet.SelectionSet decodesTo Graphql.Operation.RootQuery -> ( GraphqlClient.Model.Model name decodesTo msg, Platform.Cmd.Cmd (GraphqlClient.Model.Msg name decodesTo) )"}],"binops":[]}]