Skip to content

Commit

Permalink
fix: adds underscore_reference_keys support to interfaces
Browse files Browse the repository at this point in the history
In a previous Pull Request (Gusto#248) there was added support for underscoring the keys and while this covered the `Object` class, it didn't also cover the `Interface` module. This commit adds the same `underscore_reference_keys` method to the `Interface` module.
  • Loading branch information
moonflare committed Sep 7, 2023
1 parent 04dbe48 commit d7da7c1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/apollo-federation/interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ def key(fields:, camelize: true)
],
)
end

def underscore_reference_keys(value = nil)
if value.nil?
if @underscore_reference_keys.nil?
find_inherited_value(:underscore_reference_keys, false)
else
@underscore_reference_keys
end
else
@underscore_reference_keys = value
end
end
end
end
end

0 comments on commit d7da7c1

Please sign in to comment.