graphprotocol / graphprotocol/graph-node

Support _in where predicate for columns with array of ids

Open
#2,602 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/graphql enhancement
Dominant language
Rust
Stars
3.2k
Forks
1.1k
Avg merge
4d 1h
Merged PRs (30d)
1

Description

Is there support for the _in where-predicate for columns with array of ids.

This is useful for many-to-many relationship. The equivalent in SQL is column && anyarray → boolean.

See:
https://github.com/graphprotocol/graph-node/blob/0bd1329f127763e61ec9dda5f8b3c711e2a77a0a/store/postgres/src/relational_queries.rs#L876-L886

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading store/postgres/src/relational_queries.rs around lines 876-886, which the issue identifies as the relevant query construction area. Trace how _in predicates are handled for array-valued columns and determine the tests needed to demonstrate support for many-to-many ID arrays; done means the predicate works through the GraphQL query path.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, rust
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.