fix: improved search field serialization (#2697)

This commit is contained in:
Wyatt Johnson
2019-11-07 16:45:57 -05:00
committed by Kim Gardner
parent 3394628f27
commit 59b8dfccda
2 changed files with 2 additions and 2 deletions
@@ -50,7 +50,7 @@ const tagFilter = (tag?: GQLTAG): CommentConnectionInput["filter"] => {
const queryFilter = (query?: string): CommentConnectionInput["filter"] => {
if (query) {
return { $text: { $search: `"${query}"` } };
return { $text: { $search: JSON.stringify(query) } };
}
return {};
@@ -27,7 +27,7 @@ const roleFilter = (role?: GQLUSER_ROLE): UserConnectionFilterInput => {
const queryFilter = (query?: string): UserConnectionFilterInput => {
if (query) {
return { $text: { $search: `"${query}"` } };
return { $text: { $search: JSON.stringify(query) } };
}
return {};