-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
False
-
None
-
False
-
---
-
---
Refer to issue:
My requirement is - I have a process which contains an Array. I want to filter the process based on $elemMatch (used in Mongo Db) in an array. Is there a way I can query Array in DI.
If I use containsAny or Contains - the DI query is giving random results (not exact match).
Sample DI Query:
query commentsearch{
Comments(where:
{commentary:
{commentList:
commentCategoryCode:{equal:"RESOLVE_NOTES"},
commentText:{like:"comment"}}}{
commentary {
commentList
}
}
DI Response:
{
"data": {
"Comments": {
"commentary": {
"commentaryList": [
{ "commentCategoryCode":"RESOLVE_NOTES", "commentText": "<p>test text</p>" }
,
{ "commentCategoryCode": "NOTES",
"commentText": "<p>comment 123</p>" }
]
}
}
}
}
Expected Result:
- No Result should have been retrieved.(Since there was no data matching in Resolve_notes)
- get all the commentary objects where commentCategoryCode is RESOLVE_NOTES and commentText is like "comments"
Actual Result:
getting results even if commentText is matching in commentCategoryCode = "NOTES"
Note: In this example, we have 2 types of commentCategoryCode - RESOLVE_NOTES and NOTES