Skip to content

Add unquoted string / field support for arguments#10

Open
efrister wants to merge 1 commit intoudacity:masterfrom
efrister:feature/unquoted-string
Open

Add unquoted string / field support for arguments#10
efrister wants to merge 1 commit intoudacity:masterfrom
efrister:feature/unquoted-string

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