-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…pport and String Array search) (#2147) Note: these two PRs are ported together as #2135 depends on changes from #2134. So if we ever need to revert, this joint commit will mean that we can't put release branch in broken state. # #2134 ## Why make this change? ref. #1953 ## What is this change? Added variable support if query filter has ID - Example REST and/or GraphQL request to demonstrate modifications - Example of CLI usage to demonstrate modifications # #2135 ## Why make this change? ref. #1897 (comment) ## What is this change? Added `contains` and `notContains` support for string Array Type. 1. Data schema: ``` gql type Planet @model { id : ID!, name : String, tags: [String!] } ``` 2. GraphQl : ```graphql { planets(" + QueryBuilder.FILTER_FIELD_NAME + @" : {tags: { contains : ""tag1""}}) { items { id name } } } ``` 4. Cosmos DB Query: ```sql SELECT c.id, c.name FROM c where ARRAY_CONTAINS(c.tags, 'tag1') ``` 5. GraphQl : ```graphql { planets(" + QueryBuilder.FILTER_FIELD_NAME + @" : {tags: { notContains : ""tag3""}}) { items { id name } } } ``` 7. Cosmos DB Query: ```sql SELECT c.id, c.name FROM c where NOT ARRAY_CONTAINS(c.tags, 'tag3') ``` ## How was this tested? - [x] Integration Tests - [ ] Unit Tests --------- Co-authored-by: Sourabh Jain <sourabhjain@microsoft.com>
- Loading branch information
1 parent
8590aef
commit 446f8b2
Showing
5 changed files
with
168 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters