Stepping out on a limb here. Is there any way to possibly do logic between two different levels in a single query?
type Person {
id: ID!
name: String @search(by: [fulltext])
}
type Book {
id: ID!
title: String @search(by: [fulltext])
author: [Person]
}
What if I wanted to find every book that had either the word James in the title or as the author?
{
queryBook(filter: {title: {alloftext: "James"}}) {
id
title
author(filter: {name: {alloftext: "James"}}) {
id
name
}
}
}
This would only get the books that have an AND logic but how could this be done in a single query with OR logic? An answer using Dgraph (GraphQL±) is acceptable, but not preferable. I understand that GraphQL has its limitations to predefined schema where gragphql± is a bit more flexible in that area and it can use variables.