Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging and errors during schema generation #576

Open
cazzer opened this issue Feb 7, 2025 · 1 comment
Open

Logging and errors during schema generation #576

cazzer opened this issue Feb 7, 2025 · 1 comment

Comments

@cazzer
Copy link

cazzer commented Feb 7, 2025

Heyyy Supabase fam! Absolutely loving this extension, thanks for supporting it!

TL;DR There are a few explicit limitations for the schema generation and a few undocumented, (though reasonable ones). Would be awesome to see the schema generator's logs to more quickly find the offending issue for a table or function in question.

More details on my instance if you're curious...I was trying to expose a function similar to the following:

create or replace function search_function(
  a integer,
  b integer
)
  returns table (a integer, b integer, sum integer)
  language sql
  immutable
as $function$
  select
    a as a,
    b as b,
    a + b as sum;
$function$;

This function won't be exposed, which baffled me for far too long before I finally realized I super just need to return an id field in the response structure. My actual use case returned three different ID-ish fields, (I was union-ing some tables and pulled each ID back in separate columns) which is why I didn't think to have an additional id column.

@olirice
Copy link
Contributor

olirice commented Feb 18, 2025

I didn't totally follow the limitation you're referring to here. Could you provide an example function that isn't reflected and the change you made such that it is reflected?

Limitations are documented here
https://supabase.github.io/pg_graphql/functions/#limitations

PRs welcome if you'd like to add anything we missed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants