Download GraphQL Schema

Hi! I'm using the local development setup and would like to download the generated GraphQL schema. I ran select graphql.rebuild_schema();.

Then I try to download the schema using
curl --request GET 'http://localhost:54321/graphql/v1' \                  
-H 'apikey: eyJhbG...' \                                                                             
-H 'Authorization: Bearer eyJhbG...'

As result I get:
{"code":"PGRST202","details":null,"hint":"If a new function was created in the database with this name and parameters, try reloading the schema cache.","message":"Could not find the public.graphql() function in the schema cache"}

Obviously there should be no public.graphql() function. How should I modify my request to get the GraphQL schema?
Was this page helpful?