Skip to content

Enum support #36

@franciscolourenco

Description

@franciscolourenco

Describe the bug
Hasura's on_conflict argument expect enums to be provided without quotes, however gotql does use quotes for every argument value. This result in an error (see screenshots).

To Reproduce

gotQl.mutation(
  process.env.GRAPHQL_HOST,
  {
    operation: {
      name: 'insert_example',
      args: {
        objects: {id, status, price},
        on_conflict: {constraint: 'example_pkey', update_columns: ['status', 'price']},
      },
      fields: ['affected_rows'],
    }
  },
)

Current behavior
Part of the query:

on_conflict: {constraint: \"example_pkey\", update_columns: [\"status\", \"price\"]}

Expected behavior
Part of the query:

on_conflict: {constraint: example_pkey, update_columns: [status, price]}

Screenshots
image
image
image

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions