facebook / facebook/relay

[Modern] Adding edges to a filtered (sorted) connection

Open
#2,221 3 comments 5 reactions 0 assignees View on GitHub
enhancement wontfix
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Let's say I have a refetchContainer containing the following:

`tasks(
first: 10000
limit: $limit
page: $page
filterBy: $filterBy
orderBy: $orderBy
) @connection(
key: "Tasks_tasks"
filters: ["limit", "page", "filterBy", "orderBy"]
) {
...
}
`

Then I perform a mutation that adds a `task` and I'm able to get the `connection` in my shared updater but how can I insert the new edge into the correct position since the `insertEdge*` methods only append to beginning/end? What's the standard practice here?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.