I've setup a locale environment within docker, created a database and a web app with corresponding hostname. I'm able to use the .listDocuments API. But when I try to use GraphQL, I get a CORS error.
Also when I want to access the GraphQL Explorer through Altair, I'm not able to load the schema/docs. _APP_OPTIONS_ABUSE is set as disabled as advised by https://gist.github.com/stnguyen90/8b6b80682d80cfec130a61e60e07d1f9#file-start-appwrite-graphql-explorer-sh-L3.
What should I do extra to avoid the CORS errors for GraphQL from within my web app? And how to access through the GraphQL Explorer/Altair?
Where are you making the API calls from?
A web app? Did you add the web app as a web platform?
Both from a web app and from the GraphQL playground (Altair). The web app is added as web platform.
I though, I would be able to create my own GraphQL queries/mutation. But apparently only those provided within the docs are available., right?
Something like query {
todos(
databaseId: "655502fec6ccfd1dbd82"
) {
_id
description
}
} won't be possible, I guess?
Did you have added a platform in the console with the corresponding domain?
Yes, the platform is added with the corresponding domain. It's working fine. I wrongly thought, I could create my own GraphQL queries/mutations as I mentioned above. Apparently, it's not possible. Only those from the docs are supported, which makes GraphQL a less interesting option unfortunately. Anyway, the service as a whole is awesome.
Recommended threads
- Google OAuth2 is not working
the Google OAuth2 is working perfectly in localhost, but when I bring it to production that means real domain, then when I clicked button signin nothing happene...
- Trouble Creating Database and Collection...
I’ve set up my project credentials (endpoint, project ID) and generated an API key. I’m currently focusing on creating only the database and collections (tables...
- DOWN GRADING FROM PRO
I previously subscribed to pro on one of my projects for trial but unfortunately ive been billed for this month, my aim was to try pro for one month, is there ...