diff --git a/common/changes/@subsquid/openreader/better-fk-filter_2024-09-06-15-21.json b/common/changes/@subsquid/openreader/better-fk-filter_2024-09-06-15-21.json new file mode 100644 index 000000000..8f29b61b8 --- /dev/null +++ b/common/changes/@subsquid/openreader/better-fk-filter_2024-09-06-15-21.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@subsquid/openreader", + "comment": "extend thegraph fk filter with `_in` condition", + "type": "minor" + } + ], + "packageName": "@subsquid/openreader" +} \ No newline at end of file diff --git a/graphql/openreader/src/dialect/thegraph/schema.ts b/graphql/openreader/src/dialect/thegraph/schema.ts index 481ea373f..79034ed4b 100644 --- a/graphql/openreader/src/dialect/thegraph/schema.ts +++ b/graphql/openreader/src/dialect/thegraph/schema.ts @@ -302,6 +302,7 @@ export class SchemaBuilder { case 'lookup': fields[`${key}_is_null`] = {type: GraphQLBoolean} fields[`${key}_`] = {type: this.getWhere(prop.type.entity)} + fields[`${key}_in`] = {type: new GraphQLList(new GraphQLNonNull(GraphQLString))} break case 'list-lookup': { let where = this.getWhere(prop.type.entity)