lib/graph_ql/query.rb in graphql-0.3.0 vs lib/graph_ql/query.rb in graphql-0.4.0
- old
+ new
@@ -3,10 +3,17 @@
# The executor will send the field's name to the target object
# and use the result.
DEFAULT_RESOLVE = :__default_resolve
attr_reader :schema, :document, :context, :fragments, :params
+ # Prepare query `query_string` on {GraphQL::Schema} `schema`
+ # @param schema [GraphQL::Schema]
+ # @param query_string [String]
+ # @param context [#[]] (default: `nil`) an arbitrary hash of values which you can access in {GraphQL::Field#resolve}
+ # @param params [Hash] (default: `{}`) values for `$variables` in the query
+ # @param debug [Boolean] (default: `true`) if true, errors are raised, if false, errors are put in the `errors` key
+ # @param validate [Boolean] (default: `true`) if true, `query_string` will be validated with {StaticValidation::Validator}
def initialize(schema, query_string, context: nil, params: {}, debug: true, validate: true)
@schema = schema
@debug = debug
@query_string = query_string
@context = Context.new(context)
@@ -80,5 +87,6 @@
require 'graph_ql/query/fragment_spread_resolution_strategy'
require 'graph_ql/query/inline_fragment_resolution_strategy'
require 'graph_ql/query/operation_resolver'
require 'graph_ql/query/selection_resolver'
require 'graph_ql/query/type_resolver'
+require 'graph_ql/query/directive_chain'