I faced an issue with graphql, after turn off/on `...
# help
n
I faced an issue with graphql, after turn off/on
pg_graphql
extension. when I run the query in the sql editor, it will response me data. but when I try to use postman call the query it returns me an error. Sql Editor
Copy code
select graphql.resolve($$
    {
      usersCollection(first: 1) {
        edges {
          node {
            id
          }
        }
      }
    }
$$);
result
Copy code
{
  "data": {
    "usersCollection": {
      "edges": []
    }
  }
}
postman request
Copy code
query{
    usersCollection(first: 1) {
        edges {
            node {
                id
            }
        }
    }
}
postman response
Copy code
{
  "data": null,
  "errors": [
    {
      "message": "Unknown field 'usersCollection' on type 'Query'"
    }
  ]
}
n
Hello @norman! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
n
I tried on a new project, after I toggle the
PG_GRAPHQL
extension, the graphql schema on remain
heartbeat
, even I call
graphql.rebuild_schema()
o
hi norman are you still experiencing this? this sounds like a security challenge similar to a recently opened issue here https://github.com/supabase/pg_graphql/issues/181 could you please check the permissions associated with your table as referenced ^ and let me know if that resolves it? if not, please open an issue on the pg_graphql issue tracker https://github.com/supabase/pg_graphql/issues and I'll take a look!
n
norman (2022-05-18)