Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add client level symbol-to-keyword support #48

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

povilasjurcys
Copy link
Contributor

Adds automatic conversion from symbols to keywords setting:

default_client = ActiveGraphql::Client.new(url: 'http://example.com/graphql')
default_client.query(:users).select(:name).(status: :ACTIVE).to_graphql
# =>
#   query {
#     users(status: "ACTIVE") {
#       status
#     }
#   }

client = ActiveGraphql::Client.new(url: 'http://example.com/graphql', treat_symbol_as_keyword: true)
client.query(:users).select(:name).(status: :ACTIVE).to_graphql
# =>
#   query {
#     users(status: ACTIVE) {
#       status
#     }
#   }

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Warning: unrecognized cop Naming/MethodParameterName found in .rubocop.yml
Warning: unrecognized cop Naming/MethodParameterName found in .rubocop.yml
Warning: unrecognized cop RSpec/MultipleMemoizedHelpers found in .rubocop.yml
Error: RuboCop found unknown Ruby version 3.1 in `TargetRubyVersion` parameter (in .rubocop.yml).
Supported versions: 2.3, 2.4, 2.5, 2.6, 2.7

@povilasjurcys povilasjurcys force-pushed the add_client_level_keyword_support branch from 22d69a3 to 8cdbbfd Compare December 10, 2024 09:14
Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Warning: unrecognized cop Naming/MethodParameterName found in .rubocop.yml
Warning: unrecognized cop Naming/MethodParameterName found in .rubocop.yml
Warning: unrecognized cop RSpec/MultipleMemoizedHelpers found in .rubocop.yml
Error: RuboCop found unknown Ruby version 3.1 in `TargetRubyVersion` parameter (in .rubocop.yml).
Supported versions: 2.3, 2.4, 2.5, 2.6, 2.7

@povilasjurcys povilasjurcys force-pushed the add_client_level_keyword_support branch from 8cdbbfd to a5bd491 Compare December 10, 2024 09:17
Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Warning: unrecognized cop Naming/MethodParameterName found in .rubocop.yml
Warning: unrecognized cop Naming/MethodParameterName found in .rubocop.yml
Warning: unrecognized cop RSpec/MultipleMemoizedHelpers found in .rubocop.yml
Error: RuboCop found unknown Ruby version 3.1 in `TargetRubyVersion` parameter (in .rubocop.yml).
Supported versions: 2.3, 2.4, 2.5, 2.6, 2.7

@povilasjurcys povilasjurcys force-pushed the add_client_level_keyword_support branch from a5bd491 to 001feb8 Compare December 10, 2024 09:18
Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Warning: unrecognized cop Naming/MethodParameterName found in .rubocop.yml
Warning: unrecognized cop Naming/MethodParameterName found in .rubocop.yml
Warning: unrecognized cop RSpec/MultipleMemoizedHelpers found in .rubocop.yml
Error: RuboCop found unknown Ruby version 3.1 in `TargetRubyVersion` parameter (in .rubocop.yml).
Supported versions: 2.3, 2.4, 2.5, 2.6, 2.7

@povilasjurcys povilasjurcys changed the title Add client level keyword support Add client level symbol-to- keyword support Dec 10, 2024
@povilasjurcys povilasjurcys changed the title Add client level symbol-to- keyword support Add client level symbol-to-keyword support Dec 10, 2024
@povilasjurcys povilasjurcys merged commit 6496823 into master Dec 12, 2024
7 checks passed
@povilasjurcys povilasjurcys deleted the add_client_level_keyword_support branch December 12, 2024 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants