Closed minifisk closed 9 months ago
I'm trying to get a response from my database via the GraphQL interface. In the visual editor I run:
{ booksCollection { edges { node { id name author } } } }
And I get the response:
{ "data": { "booksCollection": { "edges": [ { "node": { "id": "1", "name": "Harry Potter and the chamber of secrets", "author": "JK Rowling" } }, { "node": { "id": "2", "name": "Grapes of wrath", "author": "John Steinbeck" } } ] } } }
However, trying to do this via CURL (following this part of the documentation: https://supabase.github.io/pg_graphql/supabase/)
curl -X POST https://MYPROJECTID.supabase.co/graphql/v1 \ -H 'apiKey: MYAPIKEY' \ -H 'Content-Type: application/json' \ --data-raw '{"query": "{ booksCollection { edges { node { id, name, author } } } }", "variables": {}}'
I get the empty response
{"data": {"booksCollection": {"edges": []}}}%
What am I doing wrong? I don't get it. I don't have any active RLS policy on my table.
Going to close this as the OP had RLS enabled and is not providing the Authorization header. And issues open in both discussions and Discord.
Bug report
Describe the bug
I'm trying to get a response from my database via the GraphQL interface. In the visual editor I run:
And I get the response:
However, trying to do this via CURL (following this part of the documentation: https://supabase.github.io/pg_graphql/supabase/)
I get the empty response
What am I doing wrong? I don't get it. I don't have any active RLS policy on my table.