Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue:
#4189
Description of changes:
I created ModelQueries.search which based on ModelQueries.list, it's the same with .list except where operations, please check if it's looks good for you, I only added matchPhrasePrefix as a operation, I noted as
/// It's only for GraphQL API with Amplify.API.query()
There are DataStore operations like
QuerySortBy
and it's not a creating any issue that only using Amplify.API users. So I just addedmatchPhrasePrefix
as aQueryPredicateOperation
.If it's looks good, I can add other operations using on search in GraphQL. These are:
matchPhrase, match, multiMatch, ne, range, regexp, eq, exists, gt, gte, lt, lte, wildcard
but I think it's already enough with
matchPhrasePrefix
.