Skip to content

Commit

Permalink
prevent calling getGqlType for 'contains' matcher (#1626)
Browse files Browse the repository at this point in the history
* prevent calling getGqlType for 'contains' matcher

* get gqlType with ternary condition
  • Loading branch information
guplersaxanoid authored Apr 20, 2023
1 parent ccd1d1a commit b163b76
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/node-core/src/indexer/dictionary.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@ function getGqlType(value: any): string {
}

function extractVar(name: string, cond: DictionaryQueryCondition): GqlVar {
let gqlType = getGqlType(cond.value);
if (cond.matcher === 'contains') {
gqlType = 'JSON';
}
const gqlType = cond.matcher === 'contains' ? 'JSON' : getGqlType(cond.value);

return {
name,
Expand Down

0 comments on commit b163b76

Please sign in to comment.