When querying with a foreign key a object is returned, how do i change it so it become key-value
Sealion
01/26/2022, 7:59 PM
Hey guys
Sealion
01/26/2022, 7:59 PM
That's my query
Sealion
01/26/2022, 7:59 PM
It returns the follwoing
Sealion
01/26/2022, 8:00 PM
Can I edit the query so it returns users: { name 'Johnnny boy' } to something like users: 'Johnny Boy' instead?
v
VuNguyen
01/27/2022, 6:02 PM
I don't think you can, maybe u can write a postgresql function to do this
s
Sealion
01/28/2022, 1:49 PM
Yeah
Sealion
01/28/2022, 1:50 PM
My solution right now is to handle it on the server, modify the response. But thought it would be nifty if it was possible to flatten it when writing the query