Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-05 15:09:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-05 15:09:00 +0300
commiteb3f624622331c74198ba299af90bd1e431a330f (patch)
tree4ce2444b78c690afa00e96259ab86b28ad211c0b /app/assets/javascripts/lib/graphql.js
parent2a134be97dafb4743eee8fc908463136ddf23b1f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/lib/graphql.js')
-rw-r--r--app/assets/javascripts/lib/graphql.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/lib/graphql.js b/app/assets/javascripts/lib/graphql.js
index 2e6fcbea80d..a4c13f9e40e 100644
--- a/app/assets/javascripts/lib/graphql.js
+++ b/app/assets/javascripts/lib/graphql.js
@@ -123,6 +123,9 @@ function createApolloClient(resolvers = {}, config = {}) {
path = '/api/graphql',
useGet = false,
} = config;
+
+ const shouldUnbatch = gon.features?.unbatchGraphqlQueries;
+
let ac = null;
let uri = `${gon.relative_url_root || ''}${path}`;
@@ -160,7 +163,7 @@ function createApolloClient(resolvers = {}, config = {}) {
};
const requestLink = ApolloLink.split(
- () => useGet,
+ () => useGet || shouldUnbatch,
new HttpLink({ ...httpOptions, fetch: fetchIntervention }),
new BatchHttpLink(httpOptions),
);