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

Conversation

@rakeshkky
Copy link
Member

Description

Support null and default values for input argument in args field for SQL function query

Affected components

  • Server
  • Tests

Related Issues

close #2250 , #2176

Solution and Design

  • Make input fields in args object as nullable
  • Execute function with SQL NULL value for an argument whose GraphQL value is null
  • Omit the input argument if it is not given so that Postgres uses it's default value if defined

Steps to test and verify

  • Define a function with default input arguments
  • Query the function in GraphQL with the omission of default arguments
  • The function should return results evaluated with default values

rakeshkky added 3 commits May 27, 2019 13:04
…ura#2250

=> If a parameter is not provided, it's default value is considered in
SQL function
=> If a parameter is provided with 'null' value, then SQL function
executed with 'NULL' value
@rakeshkky rakeshkky added s/ok-to-merge Status: This pull request can be merged to master c/server Related to server labels May 27, 2019
@rakeshkky rakeshkky self-assigned this May 27, 2019
@netlify
Copy link

netlify bot commented May 27, 2019

Deploy preview for hasura-docs ready!

Built with commit f0dc399

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

@hasura-bot
Copy link
Contributor

Review app for commit 6e8abec deployed to Heroku: https://hge-ci-pull-2282.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2282-6e8abec2

@hasura-bot
Copy link
Contributor

Review app for commit 61ff741 deployed to Heroku: https://hge-ci-pull-2282.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2282-61ff741c

0x777
0x777 previously approved these changes Jun 4, 2019
@hasura-bot
Copy link
Contributor

Review app for commit f1dbe4b deployed to Heroku: https://hge-ci-pull-2282.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2282-f1dbe4b1

@hasura-bot
Copy link
Contributor

Review app for commit 8f9fb74 deployed to Heroku: https://hge-ci-pull-2282.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2282-8f9fb748

0x777
0x777 previously approved these changes Jun 4, 2019
Copy link

@rikinsk-zz rikinsk-zz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved docs

@hasura-bot
Copy link
Contributor

Review app for commit f0dc399 deployed to Heroku: https://hge-ci-pull-2282.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2282-f0dc399b

@0x777 0x777 merged commit c3c01be into hasura:master Jun 4, 2019
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-2282.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.

How to pass NULL to a function?

5 participants