Skip to content

Commit

Permalink
Merge pull request #28 from rmosolgo/fix-possible-types
Browse files Browse the repository at this point in the history
Transform possible_types to use names
  • Loading branch information
rmosolgo authored Jun 17, 2024
2 parents 1eee9d2 + 680c9ed commit 5ded9ba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/graphql/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ def initialize(schema:, execute: nil, enforce_collocated_callers: false, raise_o
@enforce_collocated_callers = enforce_collocated_callers
if schema.is_a?(Class)
@possible_types = schema.possible_types
key, _types = @possible_types.first
# GraphQL-Ruby 2.3.5+ has classes here instead of strings
if key.is_a?(Module)
@possible_types = @possible_types.transform_keys(&:graphql_name)
end
end
@types = Schema.generate(@schema, raise_on_unknown_enum_value: raise_on_unknown_enum_value)
end
Expand Down

0 comments on commit 5ded9ba

Please sign in to comment.