Forum Discussion

vipaggar's avatar
vipaggar
Contributor
5 years ago

Join tables in LiQL

Hi

Can we join tables in LiQL? Let's say i am trying to get a post from message table by ID. I also want user details for the auther. Can i join table so that i get response in single api call?

  • As Parshant stated correctly, unfortunately JOINS are not available in LiQl, but for your example (depends of course what you need about the author) you wouldn't need to make multiple API calls either, the message object has an author property of which you can SELECT the fields you need, e.g.

    SELECT id, author.login, author.view_href, author.roles FROM messages

     

    pretty sure you know that, but maybe it helps others 😃