hasura / hasura/graphql-engine
Custom function mutations nor returning setof should be without where/limits/distinct
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version:
v2.11.1-cloud.2
### Environment
Cloud/ OSS
### What is the current behaviour?
Hasura can track mutation from custom volatile postgres function that returns single object (not an array)
```
CREATE OR REPLACE FUNCTION myMutation(name text) RETURNS tbl1 LANGUAGE plpgsql AS
$$
BEGIN
INSERT INTO
tbl1(name)
VALUES
(name) RETURNING ret;
RETURN ret;
END;
$$
```
### What is the expected behaviour?
Just `arg: {name}` for this mutation in graphql schema - without `where: {} limit distint`
### How to reproduce the issue?
1. create and track posgres function as mutation
2. check graphql schema / graphqil
### Screenshots or Screencast
graphiql doc view:

Contributor guide
Assessment
This issue has not been assessed yet.