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

fix empty set object returns postgres error in update mutation (fix #1448) #1475

Merged
merged 2 commits into from Jan 28, 2019

Conversation

rakeshkky
Copy link
Member

Description

What component does this PR affect?

  • Server
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System

Requires changes from other components? If yes, please mark the components:

  • Server
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System

Related Issue

fix #1448

Solution and Design

If collection of _set, _inc, _append, _prepend, _delete_key, _delete_elem and
_delete_at_path input objects in update mutation is empty then server returns empty response

Ex:-

mutation withEmptySet{
  update_author(
    _set: {}
    where: {name: {_eq: "clarke"}}
  ){
    affected_rows
    returning{
      id
      name
      age
    }
  }
}

Response:-

{
  "data": {
    "update_author": {
      "affected_rows": 0,
      "returning": []
    }
  }
}

Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Docs update
  • Community content

Checklist:

  • I have read the contributing guide and my code conforms to the guidelines.
  • This change requires a change in the documentation.
  • I have updated the documentation accordingly.
  • I have added required tests.

@rakeshkky rakeshkky added s/ok-to-merge Status: This pull request can be merged to master c/server Related to server labels Jan 25, 2019
@rakeshkky rakeshkky self-assigned this Jan 25, 2019
@rakeshkky rakeshkky requested a review from 0x777 January 25, 2019 12:53
@hasura-bot
Copy link
Contributor

Review app for commit 99a63c7 deployed to Heroku: https://hge-ci-pull-1475.herokuapp.com
Docker image for server: hasura/graphql-engine:pull1475-99a63c7

@hasura-bot
Copy link
Contributor

Review app for commit 988b3ce deployed to Heroku: https://hge-ci-pull-1475.herokuapp.com
Docker image for server: hasura/graphql-engine:pull1475-988b3ce

@0x777 0x777 merged commit fc73d4d into hasura:master Jan 28, 2019
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-1475.herokuapp.com is deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/server Related to server s/ok-to-merge Status: This pull request can be merged to master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

empty table_set_input causes postgres error
3 participants