-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
k/bugSomething isn't workingSomething isn't working
Description
When tracking a volatile function, the function is not showing in the GraphQL schema.
Hasura version: v1.4.0-alpha.1, deployed to Heroku.
https://bug-volatile-function-hasura.herokuapp.com/console
Steps to reproduce:
- create table
CREATE TABLE article
(
id serial primary key,
title TEXT not null,
content TEXT not null
);- create function
CREATE OR REPLACE FUNCTION public.add_article(title text, content text)
RETURNS SETOF article
LANGUAGE plpgsql
AS $function$
DECLARE inserted_article_id integer;
BEGIN
IF LENGTH(content) < 10 THEN
INSERT into article (title, content) values (title, content) RETURNING id INTO inserted_article_id;
ELSE
RAISE EXCEPTION 'article is too large';
END IF;
RETURN QUERY SELECT * from article where id = inserted_article_id;
END;
$function$- In the data tab track the table
- In the data tab track the function as a mutation
add_article does not show in the GraphQL schema.
I tried with and without the x-hasura-admin-secret in the server flags
Different functions
Adding permission to the role user and trying the role applied as user.
I wasn't able to make it work at all.
thenonameguy, LydiaF and tothda
Metadata
Metadata
Assignees
Labels
k/bugSomething isn't workingSomething isn't working