View Source GQL (gql v0.5.0)
Simple GraphQL client.
Link to this section Summary
Functions
Like query/2
, except raises GQL.GraphQLError
if the server returns errors.
Queries a GraphQL endpoint. Returns {:ok, body, headers}
upon success or {:error, body, headers}
if the response contains an "errors" key.
Link to this section Functions
Like query/2
, except raises GQL.GraphQLError
if the server returns errors.
Queries a GraphQL endpoint. Returns {:ok, body, headers}
upon success or {:error, body, headers}
if the response contains an "errors" key.
An exception will be raised for exceptional errors:
GQL.ConnectionError
if the HTTP client returns a connection error such as a timeout.GQL.ServerError
if the server responded with a 5xx code.
options
Options
:headers
- HTTP headers to include. The default value is[]
.:http_options
- Options to be passed toFinch.request/3
. The default value is[receive_timeout: 30000]
.:variables
- Keyword list or map of variables. The default value is[]
.:url
- Required. URL to which the request is made.