No need to specify the resolve type for GraphQL::Schema
This was needed back in the 0.18.11 version but not anymore after the update to 1.3.0
This commit is contained in:
@@ -18,11 +18,6 @@ class GraphqlController < ApplicationController
|
|||||||
consul_schema = GraphQL::Schema.define do
|
consul_schema = GraphQL::Schema.define do
|
||||||
query query_type
|
query query_type
|
||||||
max_depth 12
|
max_depth 12
|
||||||
|
|
||||||
resolve_type -> (object, ctx) do
|
|
||||||
type_name = object.class.name # look up types by class name
|
|
||||||
ConsulSchema.types[type_name]
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
set_query_environment
|
set_query_environment
|
||||||
|
|||||||
@@ -10,11 +10,6 @@ QueryType = query_type_creator.create
|
|||||||
ConsulSchema = GraphQL::Schema.define do
|
ConsulSchema = GraphQL::Schema.define do
|
||||||
query QueryType
|
query QueryType
|
||||||
max_depth 12
|
max_depth 12
|
||||||
|
|
||||||
resolve_type -> (object, ctx) do
|
|
||||||
type_name = object.class.name # look up types by class name
|
|
||||||
ConsulSchema.types[type_name]
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user