Skip to content

Commit c9186db

Browse files
Merge pull request #290 from graphql-devise/silence-no-fields-warning-on-base-types
Use has_no_fields(true) in base types to silence warnings
2 parents 5bf4918 + d4fc388 commit c9186db

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

lib/graphql_devise/types/mutation_type.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module GraphqlDevise
44
module Types
55
class MutationType < GraphQL::Schema::Object
66
field_class GraphqlDevise::Types::BaseField if Gem::Version.new(GraphQL::VERSION) >= Gem::Version.new('2.0')
7+
has_no_fields(true) if respond_to?(:has_no_fields)
78
end
89
end
910
end

lib/graphql_devise/types/query_type.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module GraphqlDevise
44
module Types
55
class QueryType < GraphQL::Schema::Object
66
field_class GraphqlDevise::Types::BaseField if Gem::Version.new(GraphQL::VERSION) >= Gem::Version.new('2.0')
7+
has_no_fields(true) if respond_to?(:has_no_fields)
78
end
89
end
910
end

0 commit comments

Comments
 (0)