View Source BridgeEx.Graphql.Client (bridge_ex v1.1.0)
Graphql client for BridgeEx.
Link to this section Summary
Link to this section Types
Link to this section Functions
Link to this function
call(url, query, variables, http_options, http_headers, retry_options, log_options)
View Source@spec call( url :: String.t(), query :: String.t(), variables :: map(), http_options :: Keyword.t(), http_headers :: map(), retry_options :: Keyword.t(), log_options :: Keyword.t() ) :: bridge_response()
Calls a GraphQL endpoint
parameters
Parameters
url
: URL of the endpoint.query
: Graphql query or mutation.variables
: dariables for Graphql query or mutation.http_options
: HTTPoison options.http_headers
: HTTPoison headers.retry_options
: configures retry attempts. Takes the form of[max_retries: 1, timing: :exponential]
log_options
: configures logging on errors. Takes the form of[log_query_on_error: false, log_response_on_error: false]
.
@spec format_response(%{required(atom()) => any()} | [%{required(atom()) => any()}]) :: %{required(atom()) => any()} | [%{required(atom()) => any()}]
Formats a GraphQL query response to make it Absinthe compliant