-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support the in operator for an array of objects #6315
Support the in operator for an array of objects #6315
Conversation
…hanging the tests
Deploy preview for using-drupal ready! Built with commit 3e0839d |
Deploy preview for gatsbygram ready! Built with commit 3e0839d |
…but still enable to test added functionality
So main thing here is that we shouldn't even use As this never actually worked I think it wouldn't be breaking change to change from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @pieh! And yeah, since this never worked, this wouldn't be a breaking change (at worst, what was a null result for someone's site now returns data).
Merge and release whenever you're ready.
@pieh Cool, thanks for the fix! 😊 |
@pieh so ready to merge? Will test it immediately then |
Not yet, as mentioned in my comment - I need to change operator name to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
Released as |
@m-allanson @pieh Not working for me 😦 The second elemMatch doesn't get autocompleted. |
refs gatsbyjs#6315 - In was changed to elemMatch for arrays of objects but this one reference was missed
When trying to filter an array of objects: - In v1 `in` gets autocompleted, but doesn't work, and `elemMatch` is undefined. - In v2 `elemMatch` gets autocompleted and works 🎉 I got a bit confused between which version I was on, and this lil typo got me even more confused 😅 Thanks for Gatsby v2 ❤️ ----- refs #6315 - In was changed to elemMatch for arrays of objects but this one reference was missed
While using Prismic.io as my data source I encountered the problem that I can't filter for tags anymore like with using markdown. I found this issue:
#3643
Kyle suggested that the tests should be modified first so that other people (who can actually fix that 😆 ) can figure it out.
Would be cool of course if the initial request of the issue could be done, not only my issue with Prismic. Feel free to edit this PR to make it work 👍
I added everything like Prismic is outputting it and how GraphiQL suggests the query/filter. At the moment the result is null. The
can filter for Prismic tags
was just a random name, there's probably a better solution.Query output:

Filter attempt:

Filter with query variable:
