Help: How do I generate `schema.grapghql` from my ...
# sql
d
Help: How do I generate
schema.grapghql
from my Supabase Tables. Is there any command I can run to automatically generate the schema?
s
Move your conversation to this thread as I've asked before. I'm not too familiar with GraphQL so I can't help you much, but someone who is might be able to help if they can see all the information in one place.
d
Thanks
1. Here is my sql query, how do I fetch the Schema from this after running the query? -- Turn on automatic inflection of type names comment on schema public is '@graphql({"inflect_names": true})'; create table profile( id uuid primary key, username varchar(255) not null, avatar_url varchar(255), bio varchar(255), created_at timestamp not null, updated_at timestamp not null ); -- enable a totalCount field on the account query type comment on table profile is e'@graphql({"totalCount": {"enabled": true}})'; create table post( id serial primary key, url varchar(255) not null, profile_id uuid not null references profile(id), media varchar(255), media_type varchar(255), media_hash varchar(255), description varchar(255), created_at timestamp not null, updated_at timestamp not null ); create table blog_post( id uuid not null default uuid_generate_v4() primary key, blog_id integer not null references post(id), title varchar(255) not null, body varchar(10000), created_at timestamp not null, updated_at timestamp not null ); select graphql.rebuild_schema();
f
@here I'm not able to reach the gql endpoint
https://bzzyssnaoritngwvgtmy.supabase.co/graphql/v1
the @User should be able to help you expose that endpoint on your project
that's the failing URL
d
Thanks
f
u're welcome!
@solarsandpiper What is your recommendation for this issue? Do you have support ticket system?
b
https://supabase.com/support file a ticket using email support. We’ll take good care of you!
s
thanks @burggraf! @fernandolguevara I work on marketing at Supabase so my ability to help solve issues is limited 😊
f
a workaround to this issue was to create a new supabase project and import on the new db the old structure
s
Hopefully there is a less nuclear solution 🤞 - this is a pretty horrible outcome for a project used in production (ie changing
env
keys all the way through the production stack across several libraries / deployments) 😭
f
@samüel report this issue to the team via email
d
@fernandolguevara Now I created another project
This solves it