Taking most of the text from this post
I’m trying to query the GraphQL API to find any record of certain types that match a certain filter.
Two common example cases:
Case 1: Search by slug
I know the “slug” of a page/record, but I don’t know its modelType, how can I query the GraphQL API to find any record that has that slug? (for example, we write articles, product reviews, ski reviews, tour guides, etc; all are different models, have different types of fields, have different presentations at the front end ).
Case 2: Search by category
I have a Category, and Articles OR Projects could have that category. How could I search for any Article or Project that has Category X? Searching them separately isn’t a good option, because sorting and pagination would be thrown off. For example, under skitest category, we write articles on ski, reviews on ski etc.
Something like this would make sense: