question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Console GraphiQL explorer stops working after tracking custom function

See original GitHub issue

I am using Hasura v1.3.2 and postgres 11 from here

The table

create table "user"
(
	id bigserial not null
		constraint user_pkey
			primary key,
	username text,
	password text
);

The function

CREATE OR REPLACE FUNCTION public.get_user()
RETURNS SETOF public."user" AS $$
  SELECT *
  FROM public."user"
  LIMIT 1
$$ LANGUAGE sql STABLE;

As soon as i press Track button for get_user in Untracked custom functions the GraphiQL explorer stops working. And instead shows NO SCHEMA AVAILABLE

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:6
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
tirumaraiselvancommented, Oct 28, 2020

Yes, there is a bug where if a function has a row type argument and it is tracked at top level (under query) and also as computed field, the introspection fails silently.

We haven’t really seen a real use-case where a function needs to have row type argument and also tracked at top -level. Usually, it is used as computed field. Can you describe if you need the function to be both top-level and computed field?

We should improve the experience here.

1reaction
kolharsamcommented, Oct 25, 2020

@karibertils this might be the case if you’ve used this custom function within a computed field as well. If this is indeed the case, then you could head over to #3757, where similar concerns are being tracked.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Schema not loading in Explorer and Editor #5514 - GitHub
It works neither is checked, I get the schema for anonymous role. The requests are working in both cases so just an issue...
Read more >
API Reference: ApolloServer - Apollo GraphQL Docs
(It's not needed for the non-Sandbox version of Apollo Studio Explorer, ... custom functions to use as additional validation rules when validating ...
Read more >
Postgres: Extend schema with SQL functions - Hasura
Customise the Hasura GraphQL schema with Postgres SQL functions. ... created and tracked a custom function, search_articles , with the following definition:.
Read more >
Why hasura console not returning data as my custom sql ...
I created a function that just returns passed json parameter to check if the parameter is not changed when passed by hasura. It...
Read more >
Developing and testing GraphQL APIs, Storage and Functions ...
Note, the local mocking and testing features in the Amplify CLI will also work with iOS and Android apps. Next, we add a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found