这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@rakeshkky
Copy link
Member

Description

The server used to throw 500 Internal error when null value is provided against input fields in <table-name>_order_by input object.

Query:-

query {
  article(order_by: [{id: null}]) {
    title
  }
}

Response:-

{
  "errors": [
    {
      "extensions": {
        "path": "$.selectionSet.article.args.order_by",
        "code": "unexpected"
      },
      "message": "unexpected null for ty 'order_by'"
    }
  ]
}

This PR fixes this issue.

Affected components

  • Server
  • Tests

Related Issues

fixes #2754

Solution and Design

  • Consider Maybe values for all input fields under order_by input. The value is Nothing when null is provided. Omit the input if Nothing is found.

Steps to test and verify

Follow the test case added in this PR

@rakeshkky rakeshkky requested a review from lexi-lambda as a code owner August 20, 2019 12:39
@rakeshkky rakeshkky self-assigned this Aug 20, 2019
@rakeshkky rakeshkky added c/server Related to server s/ok-to-merge Status: This pull request can be merged to master labels Aug 20, 2019
@netlify
Copy link

netlify bot commented Aug 20, 2019

Deploy preview for hasura-docs ready!

Built with commit 7e1ebaa

https://deploy-preview-2755--hasura-docs.netlify.com

@rakeshkky rakeshkky added this to the beta.5 milestone Aug 20, 2019
@rakeshkky rakeshkky force-pushed the issue-2754-null-orderby branch from dac20ff to 9e2636b Compare August 20, 2019 12:43
@hasura-bot
Copy link
Contributor

Review app for commit 9e2636b deployed to Heroku: https://hge-ci-pull-2755.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2755-9e2636b4

@rakeshkky rakeshkky force-pushed the issue-2754-null-orderby branch from 9e2636b to 7e1ebaa Compare August 21, 2019 11:42
@lexi-lambda lexi-lambda merged commit 8ac78fd into hasura:master Aug 22, 2019
@hasura-bot
Copy link
Contributor

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

polRk pushed a commit to polRk/graphql-engine that referenced this pull request Feb 12, 2020
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.

accept null values in order by expression

3 participants