Closed ElvinEfendi closed 8 months ago
In Rails, it's quite common to use as_json which relies on to_hash that graphql-client currently lacks. This PR introduces to_hash as an alias to to_h.
as_json
to_hash
to_h
Ref: https://github.com/rails/rails/blob/3528b9df8b331863025c6ee66341b98d4989c40d/activesupport/lib/active_support/core_ext/object/json.rb#L59
Looks good to me -- thanks for this improvement!
In Rails, it's quite common to use
as_json
which relies onto_hash
that graphql-client currently lacks. This PR introducesto_hash
as an alias toto_h
.Ref: https://github.com/rails/rails/blob/3528b9df8b331863025c6ee66341b98d4989c40d/activesupport/lib/active_support/core_ext/object/json.rb#L59