Can't get data from multiple table in one api call

I have a table where i put pointer of other table row. if i query in the table, also want to get the table pointer row data, i get 502 error

Can you share your code for help?