diff --git a/lib/graphql_devise/types/mutation_type.rb b/lib/graphql_devise/types/mutation_type.rb index 83b842a0..d97ccae0 100644 --- a/lib/graphql_devise/types/mutation_type.rb +++ b/lib/graphql_devise/types/mutation_type.rb @@ -4,6 +4,7 @@ module GraphqlDevise module Types class MutationType < GraphQL::Schema::Object field_class GraphqlDevise::Types::BaseField if Gem::Version.new(GraphQL::VERSION) >= Gem::Version.new('2.0') + has_no_fields(true) if respond_to?(:has_no_fields) end end end diff --git a/lib/graphql_devise/types/query_type.rb b/lib/graphql_devise/types/query_type.rb index c676e881..fc583ad7 100644 --- a/lib/graphql_devise/types/query_type.rb +++ b/lib/graphql_devise/types/query_type.rb @@ -4,6 +4,7 @@ module GraphqlDevise module Types class QueryType < GraphQL::Schema::Object field_class GraphqlDevise::Types::BaseField if Gem::Version.new(GraphQL::VERSION) >= Gem::Version.new('2.0') + has_no_fields(true) if respond_to?(:has_no_fields) end end end