Skip to content

Commit

Permalink
Transform possible_types to use names
Browse files Browse the repository at this point in the history
  • Loading branch information
rmosolgo committed Jun 14, 2024
1 parent 8f89186 commit 680c9ed
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 680c9ed

Please sign in to comment.