The documentation I linked was info on fetch and promises. Query is not fetch, so it doesn't return the same thing and you won't get Received response: 200
I understand.
I was getting an "undefined" response. How do i resolve that?
Log response to see if that will help you figure out how to use it
it hasn't helped
What is your code now? With logging response?
You should know how to work with response now
well I didn't get any data in that response which I should have, but I can't get that json again. I'm only getting the red error in the photo
You're getting that error because there's something wrong with your code
Please tell me how I could find out the proper response code since the following is incorrect:
if (!response.ok) {
}
Response doesn't have an ok property. Look at what was logged
This is actually a desired object, rather than a bad response... but I don't have the conditional correct
yes. I did see that sometimes an error array will exist when I forced an error
I'm able to get information up to console.log(response.data.search1.documents[0].data); but I can't access the attributes under the documents data. For example I want to access group_a value of "bye" I will try mapping
Can you tell what the type is for the value of the document data?
string
maybe I need to convert it
EUREKA!
THANK you for walking with me on this journey π
[SOLVED] Retrieve promise object data from graphql query
Recommended threads
- Many2Many loading, not receiving list
Hi everyone! Im having a bit of trouble while editing single rows in the DB. When selecting a value of my many2many it keeps loading, see screenshot. On some ...
- Appwrite Python SDK Keeps returning the ...
So I have a couple services, one is a scheduling engine responsible for fetching data from a database and launching a containerized micro service to process tha...
- SSR Auth with Tanstack Start requires ha...
I followed the Next.js guide for SSR Auth on https://appwrite.io/docs/tutorials/nextjs-ssr-auth/step-1 I tried to replicate it for Tanstack Start. However, on...