class
GraphQL::Schema
- GraphQL::Schema
- Reference
- Object
Defined in:
graphql/schema.crConstant Summary
-
EMPTY_VARIABLES =
{} of String => Language::FValue -
For operations that declare no variables; never mutated.
Constructors
Instance Method Summary
- #document : Language::Document
- #execute(query : String, variables : Hash(String, JSON::Any) | Nil = nil, operation_name : String | Nil = nil, context = Context.new) : String
- #execute(io : IO, query : String, variables : Hash(String, JSON::Any) | Nil = nil, operation_name : String | Nil = nil, context = Context.new) : Nil
-
#subscribe(query : String, variables : Hash(String, JSON::Any) | Nil = nil, operation_name : String | Nil = nil, context = Context.new) : Subscription
Starts a subscription.
Constructor Detail
def self.new(query : QueryType, mutation : MutationType | Nil = nil, subscription : SubscriptionType | Nil = nil)
#
Instance Method Detail
def execute(query : String, variables : Hash(String, JSON::Any) | Nil = nil, operation_name : String | Nil = nil, context = Context.new) : String
#
def execute(io : IO, query : String, variables : Hash(String, JSON::Any) | Nil = nil, operation_name : String | Nil = nil, context = Context.new) : Nil
#
def subscribe(query : String, variables : Hash(String, JSON::Any) | Nil = nil, operation_name : String | Nil = nil, context = Context.new) : Subscription
#
Starts a subscription. Each value the resolver's channel produces is delivered as one response document. A request that cannot be started yields a subscription that delivers a single error response and is already closed.