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
- Suspicious access pattern detected when ...
Hello, I am having trouble restoring my project. In the past it worked with no problems, but today I get an error "Suspicious access pattern detected". How can ...
- Websites hosted on my appwrite sites hav...
Hello, all my websites hosted on appwrite sites are not running I am getting this message "This site canβt be reached drivehub.appwrite.network took too long t...
- Session cookies stored on wrong (sub-)do...
Hi, I own a domain `example.com` which is registered with the Appwrite nameserver. My website runs on Sites, using `www.example.com` as domain, and my function...