From d4fc3889862946c2bac1c474a0213bc4bfa97dee Mon Sep 17 00:00:00 2001 From: Mario Celi Date: Tue, 14 Apr 2026 21:49:17 -0500 Subject: [PATCH] Use has_no_fields(true) in base types to silence warnings --- lib/graphql_devise/types/mutation_type.rb | 1 + lib/graphql_devise/types/query_type.rb | 1 + 2 files changed, 2 insertions(+) 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