Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9ce4817

Browse files
XiNiHafacebook-github-bot
authored andcommitted
Add plural fragment support to observeFragment() (#4862)
Summary: This PR adds plural fragment support to `observeFragment()` (and `waitForFragmentData()` which uses `observeFragment()` under the hood) It should be noted that the Relay environment currently doesn't support subscribing to plural fragment updates, so the implementation is done by subscribing to each selector and merging the states. Since the current implementation doesn't do any batching of notifications that are made from each selector subscription, it can be somewhat inefficient if the consumer doesn't batch on their own. Pull Request resolved: #4862 Reviewed By: tyao1 Differential Revision: D67148721 Pulled By: captbaritone fbshipit-source-id: 1c63178c78ece3588ac86b8814d9b8fbf2ce057b
1 parent d64b0e9 commit 9ce4817

17 files changed

+1566
-23
lines changed

packages/relay-runtime/store/__tests__/__generated__/observeFragmentTestListUpdateFragment.graphql.js

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/relay-runtime/store/__tests__/__generated__/observeFragmentTestListUpdateQuery.graphql.js

Lines changed: 137 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/relay-runtime/store/__tests__/__generated__/observeFragmentTestMissingRequiredPluralFragment.graphql.js

Lines changed: 65 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)