shopify_graphql v0.1.0 Shopify.GraphQL
Link to this section Summary
Link to this section Types
Link to this type
http_headers_t()
Link to this type
http_method_t()
http_method_t()
http_method_t() :: :delete | :get | :post | :put
http_method_t() :: :delete | :get | :post | :put
Link to this section Functions
Link to this function
put_variable(operation_or_query, name, value)
put_variable(operation_or_query, name, value)
put_variable(
binary() | Shopify.GraphQL.Operation.t(),
binary() | atom(),
any()
) :: Shopify.GraphQL.Operation.t()
put_variable( binary() | Shopify.GraphQL.Operation.t(), binary() | atom(), any() ) :: Shopify.GraphQL.Operation.t()
Add a variable to the operation.
It's possible to pass either a Shopify.GraphQL.Operation
struct or, as a
convenience, a binary query.
Link to this function
send(operation_or_query, config \\ %{})
send(operation_or_query, config \\ %{})
send(binary() | Shopify.GraphQL.Operation.t(), map()) ::
{:ok, Shopify.GraphQL.Response.t()} | {:error, any()}
send(binary() | Shopify.GraphQL.Operation.t(), map()) :: {:ok, Shopify.GraphQL.Response.t()} | {:error, any()}
Send a GraphQL operation to Shopify.
It's possible to send either a Shopify.GraphQL.Operation
struct or, as a
convenience, a binary query.
query =
"""
{
shop {
name
}
}
"""
operation = %Shopify.GraphQL.Operation{ query: query }
Shopify.GraphQL.send(operation)
or
query =
"""
{
shop {
name
}
}
"""
Shopify.GraphQL.send(query)
You may also pass an optional map of config overrides. This allows you to use different config values on a per-request basis.