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 unquoted string / field support for arguments #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

efrister
Copy link

Hi!
I didn't find a way to modify a mutation with arguments to reference fields (strings) without quotes.
Use Case:
https://hasura.io/docs/1.0/graphql/manual/mutations/upsert.html

The "on_conflict" clause requires to pass the fields without quotes.

on_conflict: {
      constraint: article_pkey,
      update_columns: [title, content]
}

This pull request is a proposal to add a new ArgumentField, which will take a string and transform it without quotes. In addition, this makes the ArgumentValue interface public in case anyone needs custom transformations for arguments.
I'm open to suggestions on how to improve or change this PR for it to get accepted.

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.

1 participant