DT
Drizzle Team•5mo ago
yayarea

query data question

I built an api in localhost:3000 where i have my drizzle schema and it is attached as an image here. I am trying to query on a react native app that i created by doing something like this {appointment.facility.address} since i have address stored as an attribute in the facilities shcema. It doesnt work when i query this way and in fact when I use Postman to analyze the json response i notice that in the only the name appears after the facility attribute within the appointment json data. is there a way i can modify this so that i can expose all of the data as an object in the facility attribute so that i can access that data and query it on the front end of my app. for now only the name displays and i want to grab the full address. example is attached as well. i would like to do this for patient too which is the same issue. thanks in advance!
No description
No description
No description
No description
2 Replies
Mario564
Mario564•4mo ago
👋 What's the query you've written that outputs that JSON?
yayarea
yayareaOP•4mo ago
hey i figured it out thank you i simply added the attributes to the appointment query so that i can do something like appointment.facility.address.
Want results from more Discord servers?
Add your server