class
GraphQL::Context
- GraphQL::Context
- Reference
- Object
Defined in:
graphql/context.crInstance Method Summary
-
#complexity : Int32
Number of fields the executed operation selected, filled in by
Schema#executebefore resolution starts. -
#complexity=(complexity : Int32)
Number of fields the executed operation selected, filled in by
Schema#executebefore resolution starts. - #document : Language::Document | Nil
- #document=(document : Language::Document | Nil)
- #fragments : Array(Language::FragmentDefinition)
- #fragments=(fragments : Array(Language::FragmentDefinition))
-
#handle_exception(ex : ::Exception) : String | Nil
Return string message to be added to errors object or throw to bubble up
-
#in_flight : Int32
Number of resolver fibers spawned by this execution that have not yet finished.
-
#max_complexity : Int32 | Nil
Maximum number of fields a single operation may select, counted statically across the whole selection tree with fragments expanded.
-
#max_complexity=(max_complexity : Int32 | Nil)
Maximum number of fields a single operation may select, counted statically across the whole selection tree with fragments expanded.
-
#max_concurrency : Int32
Maximum number of fibers this execution may spawn at once to resolve fields and array elements concurrently.
-
#max_concurrency=(max_concurrency : Int32)
Maximum number of fibers this execution may spawn at once to resolve fields and array elements concurrently.
-
#max_depth : Int32
Maximum nesting of selection sets, lists and input objects a query may have.
-
#max_depth=(max_depth : Int32)
Maximum nesting of selection sets, lists and input objects a query may have.
- #mutation_type : String | Nil
- #mutation_type=(mutation_type : String | Nil)
- #query_type : String
- #query_type=(query_type : String)
- #subscription_type : String | Nil
- #subscription_type=(subscription_type : String | Nil)
Instance Method Detail
Number of fields the executed operation selected, filled in by
Schema#execute before resolution starts.
Number of fields the executed operation selected, filled in by
Schema#execute before resolution starts.
Return string message to be added to errors object or throw to bubble up
Number of resolver fibers spawned by this execution that have not yet finished.
Maximum number of fields a single operation may select, counted
statically across the whole selection tree with fragments expanded.
nil (the default) disables the check. An operation that exceeds the
limit is rejected before any resolver runs.
Maximum number of fields a single operation may select, counted
statically across the whole selection tree with fragments expanded.
nil (the default) disables the check. An operation that exceeds the
limit is rejected before any resolver runs.
Maximum number of fibers this execution may spawn at once to resolve fields and array elements concurrently.
0 (the default) resolves everything sequentially in the calling fiber.
Any higher value lets up to that many resolvers run concurrently; once
the budget is used up, further work runs inline in the fiber that
requested it, so nesting can never deadlock and a single query can never
fan out into an unbounded number of fibers.
Pick a value that your downstream resources can sustain. For example, resolvers that check out database connections should stay below the connection pool size.
Maximum number of fibers this execution may spawn at once to resolve fields and array elements concurrently.
0 (the default) resolves everything sequentially in the calling fiber.
Any higher value lets up to that many resolvers run concurrently; once
the budget is used up, further work runs inline in the fiber that
requested it, so nesting can never deadlock and a single query can never
fan out into an unbounded number of fibers.
Pick a value that your downstream resources can sustain. For example, resolvers that check out database connections should stay below the connection pool size.
Maximum nesting of selection sets, lists and input objects a query may have. Parsing stops with an error beyond it. The default of 100 is far above what real queries use, and protects the process: nesting a few thousand levels deep would otherwise overflow the stack.
Maximum nesting of selection sets, lists and input objects a query may have. Parsing stops with an error beyond it. The default of 100 is far above what real queries use, and protects the process: nesting a few thousand levels deep would otherwise overflow the stack.