Files
cypress/patches/@urql+exchange-graphcache+4.3.6.patch
Tim Griesser 383bdb1d3d fix: UNIFY-1625 Runs tab not updating in real time (#21370)
* feat: improved CloudDataSource caching & tests

* feat: pushFragment subscription, for updating the client with remote data (#21408)

* refactor: add pushFragment utility for pushing remote data into the client

* fix: UNIFY-1625 Runs tab not updating in real time (#21412)

* allow returning a Response object in the remoteGraphQLIntercept, handle 401
2022-05-12 09:06:12 -04:00

31 lines
1.6 KiB
Diff

diff --git a/node_modules/@urql/exchange-graphcache/dist/urql-exchange-graphcache-extras.js b/node_modules/@urql/exchange-graphcache/dist/urql-exchange-graphcache-extras.js
index 3148bdf..45eea4c 100644
--- a/node_modules/@urql/exchange-graphcache/dist/urql-exchange-graphcache-extras.js
+++ b/node_modules/@urql/exchange-graphcache/dist/urql-exchange-graphcache-extras.js
@@ -158,6 +158,10 @@ exports.relayPagination = function relayPagination(r) {
if (null === N) {
continue;
}
+ // https://github.com/FormidableLabs/urql/issues/2430
+ if (!N.nodes.length && !N.edges.length && l) {
+ continue;
+ }
if ("inwards" === n && "number" == typeof _.last && "number" == typeof _.first) {
var C = N.edges.slice(0, _.first + 1);
var b = N.edges.slice(-_.last);
diff --git a/node_modules/@urql/exchange-graphcache/dist/urql-exchange-graphcache-extras.mjs b/node_modules/@urql/exchange-graphcache/dist/urql-exchange-graphcache-extras.mjs
index 61d3c2d..452a115 100644
--- a/node_modules/@urql/exchange-graphcache/dist/urql-exchange-graphcache-extras.mjs
+++ b/node_modules/@urql/exchange-graphcache/dist/urql-exchange-graphcache-extras.mjs
@@ -158,6 +158,10 @@ function relayPagination(r) {
if (null === N) {
continue;
}
+ // https://github.com/FormidableLabs/urql/issues/2430
+ if (!N.nodes.length && !N.edges.length && l) {
+ continue;
+ }
if ("inwards" === n && "number" == typeof _.last && "number" == typeof _.first) {
var C = N.edges.slice(0, _.first + 1);
var I = N.edges.slice(-_.last);