Array Queries with Realm GraphQL

I wish to query properties on an array with Realm Graphql. From the screenshot, you can see that I’m trying to filter out “alias” that equal “metaTitle”. However, the results tab displays objects with “metaTitle”. I feel I’m close but the syntax is incorrect. This page has useful examples, however, these methods did not work for me.

Hi @Anthony_H

Welcome to MongoDB community.

Have you tried: fields_nin : { alias_nin : "metaTitle" } ?


Thanks, that works!

Hope you don’t mind a followup question. The following query returns results.

contents(query: {fields: {alias_in: "isFeatured"}})

however, when I add additional parameters. No data is returned.

contents(query: {fields: {alias_in: "isFeatured", boolean:true}})



Perhaps use an and expression:
{ AND: [{ fields : {alias_in : "isFeatured" }, { fields : { boolean_in : true} }] }


1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.