Exception: GraphQL::Throttled
- Defined in:
- lib/graphql/throttled.rb
Overview
An endpoint refusing a query for what it costs rather than for anything about the query itself. Worth telling apart: the same query is answered once the budget it is priced against has refilled.
Instance Attribute Summary collapse
-
#cost ⇒ Hash
readonly
Those numbers, in the endpoint's own words.
Instance Method Summary collapse
-
#initialize(message, cost = {}) ⇒ Throttled
constructor
A new instance of Throttled.
Constructor Details
#initialize(message, cost = {}) ⇒ Throttled
Returns a new instance of Throttled.
8 9 10 11 |
# File 'lib/graphql/throttled.rb', line 8 def initialize(, cost = {}) super @cost = cost end |
Instance Attribute Details
#cost ⇒ Hash (readonly)
Returns those numbers, in the endpoint's own words.
14 15 16 |
# File 'lib/graphql/throttled.rb', line 14 def cost @cost end |