[SOLVED] GraphQL Explorer not connecting to collection on localhost
- 0
- Self Hosted
- Accounts
- Databases
- Web
The docs (https://appwrite.io/docs/server/databases?sdk=graphql-default#databasesListCollections) have this:
query {
databasesListCollections(
databaseId: "[DATABASE_ID]"
) {
total
collections {
_id
_createdAt
_updatedAt
_permissions
databaseId
name
enabled
documentSecurity
attributes
indexes {
key
type
status
attributes
}
}
}
}
so you might want to start with that
and then the explorer gives a warning about attributes
so you can remove it to quickly test an API call
do i need to reference a collection or do queries search across all collections in a database?
What do you mean? this API call is list collections...it lists all the collections in a database
list documents will give you the documents in a collection: https://appwrite.io/docs/server/databases?sdk=graphql-default#databasesListDocuments
sometimes a message pops up and says "something is broken"
no these are not the right headers. see the list of headers here: https://appwrite.io/docs/rest#headers
oohhh..
and you never answered how you're accessing the Appwrite console. What's the URL you use to access your Appwrite console?
this error says something about file variables...can you open the variables pane at the bottom left of the screenshot you shared?
variables is empty
how about files at the bottom of the variables pane
0 files
what exactly shows there?
sure...make sure to fill in the appropriate values, though
they are filled
There you go. and the explorer can help give you hints about what's wrong with the query
interesting though i got this error whether or not i had the project and key filled out
yes because the query itself is invalied. you can see attributes and index have a red underline in the query
I can connect thank you
[SOLVED] GraphQL Explorer not connecting to collection on localhost
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...