Many to many relationship

I have two models Book and Author. Book has many Authors and Author has many Books. I am using relation type to implement that. But i can not get all books of an authors like i get all authors of a book. Please tell me what should i do? Thank you!

Could you share your model? It is not clear to me where are your relations. Would you mind to also share what you’ve tried so far to get all authors of a book?

Here are my two models:


The “authors” relation in model Book ref to User. And i want to get all books of one given User. Can i reuse this relation? Thank you!

You can do something like: new Parse.Query('Book').equalTo('authors', userObject).find()

Thank you very much!!!. Does it same work like this query in graphql??

Yes. It should work. I’ve just tested the following and it worked for me:

# Write your query or mutation here
query {
  people(where: { children: { have: { name: { equalTo: "Someone" } } } }) {
    edges {
      node {
        name
      }
    }
  }
}