Shopify.GraphQL.Limiter.ThrottleState (shopify_graphql v2.1.0)

Link to this section Summary

Functions

Returns a Shopify.GraphQL.Limiter.ThrottleStatus struct from a Shopify.GraphQL.Response struct.

Link to this section Types

@type t() :: %Shopify.GraphQL.Limiter.ThrottleState{
  currently_available: integer(),
  maximum_available: integer(),
  restore_rate: integer()
}

Link to this section Functions

@spec new(Shopify.GraphQL.Response.t()) :: t()

Returns a Shopify.GraphQL.Limiter.ThrottleStatus struct from a Shopify.GraphQL.Response struct.

Link to this function

throttle_for(throttle_state, to)

@spec throttle_for(t(), :half | :max | non_neg_integer()) :: non_neg_integer()