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

Conversation

@rakeshkky
Copy link
Member

Description

For custom SQL functions, the args input field is not generated if the function does not have any input arguments other than the session variable argument. In such a case, the omission of args input field defaults to empty arguments and session variable argument is ignored. This is creating a Postgres query error since the SQL function is executed with no input arguments. Refer to the related issue (see below) for more details.

This PR fixes the above-said issue.

Affected components

  • Server
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System
  • Tests
  • Other (list it)

Related Issues

Fix #3576

Solution and Design

  • parseFunctionArgs function is improved to accept args input field value as Maybe type.
  • If no args input provided, the known argument values (in this case session variable argument) are resolved as positional arguments.

Server checklist

Catalog upgrade

Does this PR change Hasura Catalog version?

  • No

Metadata

Does this PR add a new Metadata feature?

  • No
  • Yes

GraphQL

  • No new GraphQL schema is generated
  • New GraphQL schema is being generated:

Breaking changes

  • No Breaking changes
  • There are breaking changes:

Steps to test and verify

Limitations, known bugs & workarounds

@rakeshkky rakeshkky added the c/server Related to server label Dec 24, 2019
@rakeshkky rakeshkky self-assigned this Dec 24, 2019
@rakeshkky rakeshkky added the e/quickfix can be wrapped up in few hours label Dec 24, 2019
@netlify
Copy link

netlify bot commented Dec 24, 2019

Deploy preview for hasura-docs ready!

Built with commit d8f9e38

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

@lexi-lambda
Copy link
Contributor

/heroku deploy

@hasura-bot
Copy link
Contributor

Review app for commit 5ad8898 deployed to Heroku: https://hge-ci-pull-3585.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3585-5ad88982

@hasura-bot
Copy link
Contributor

Review app for commit d8f9e38 deployed to Heroku: https://hge-ci-pull-3585.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3585-d8f9e382

@lexi-lambda lexi-lambda merged commit 181902c into hasura:master Dec 26, 2019
@hasura-bot
Copy link
Contributor

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

@SidhNor
Copy link

SidhNor commented Dec 27, 2019

Is there a chance for minor release for this?

@dminkovsky
Copy link
Contributor

Can confirm preview app via docker image works.

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 e/quickfix can be wrapped up in few hours

Projects

None yet

Development

Successfully merging this pull request may close these issues.

accesing hasura session from custom function fails

5 participants