I am trying to query from the GraphQL endpoint
https://us-east-1.aws.realm.mongodb.com/api/client/v2.0/app/refoyer-dev-app-odbnf/graphql with external JWT authentication enabled, from a Vue3 app, but I am getting this error :
Access to fetch at 'https://us-east-1.aws.realm.mongodb.com/api/client/v2.0/app/refoyer-dev-app-odbnf/graphql' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Is the solution to this error in this Issue ( CORS error when connecting to MongoDB Atlas using Graphql) still correct? Do I need to access the GraphQL endpoint from a proxy server and not directly from the browser app?
If that is true, then why am I able to query from the same endpoint from the same Vue3 app using Anonymous Login Auth Token provided by the Realm SDK?