@apollo/gateway
Advanced tools
Comparing version 2.4.11 to 2.4.12
@@ -145,5 +145,2 @@ "use strict"; | ||
} | ||
if (errors.length > 0) { | ||
span.setStatus({ code: api_1.SpanStatusCode.ERROR }); | ||
} | ||
return errors.length === 0 ? { data } : { errors, data }; | ||
@@ -150,0 +147,0 @@ }); |
@@ -26,2 +26,3 @@ import type { Logger } from '@apollo/utils.logger'; | ||
private pollIntervalMs; | ||
private fallbackPollIntervalInMs?; | ||
private logger; | ||
@@ -28,0 +29,0 @@ private update?; |
@@ -52,2 +52,3 @@ "use strict"; | ||
this.pollIntervalMs = fallbackPollIntervalInMs !== null && fallbackPollIntervalInMs !== void 0 ? fallbackPollIntervalInMs : this.pollIntervalMs; | ||
this.fallbackPollIntervalInMs = fallbackPollIntervalInMs; | ||
if (this.pollIntervalMs < UplinkSupergraphManager.MIN_POLL_INTERVAL_MS) { | ||
@@ -134,2 +135,5 @@ this.logger.warn('Polling Apollo services at a frequency of less than once per 10 seconds (10000) is disallowed. Instead, the minimum allowed pollInterval of 10000 will be used. Please reconfigure your `fallbackPollIntervalInMs` accordingly. If this is problematic for your team, please contact support.'); | ||
this.pollIntervalMs = result.minDelaySeconds * 1000; | ||
if (this.fallbackPollIntervalInMs) { | ||
this.pollIntervalMs = Math.max(this.pollIntervalMs, this.fallbackPollIntervalInMs); | ||
} | ||
} | ||
@@ -136,0 +140,0 @@ } |
{ | ||
"name": "@apollo/gateway", | ||
"version": "2.4.11", | ||
"version": "2.4.12", | ||
"description": "Apollo Gateway", | ||
@@ -28,5 +28,5 @@ "author": "Apollo <packages@apollographql.com>", | ||
"dependencies": { | ||
"@apollo/composition": "2.4.11", | ||
"@apollo/federation-internals": "2.4.11", | ||
"@apollo/query-planner": "2.4.11", | ||
"@apollo/composition": "2.4.12", | ||
"@apollo/federation-internals": "2.4.12", | ||
"@apollo/query-planner": "2.4.12", | ||
"@apollo/server-gateway-interface": "^1.1.0", | ||
@@ -33,0 +33,0 @@ "@apollo/usage-reporting-protobuf": "^4.1.0", |
@@ -91,3 +91,3 @@ import { Headers } from 'node-fetch'; | ||
assert( | ||
usedVariables.size === (usedVariableDefinitions?.length ?? 0), | ||
usedVariables.size === (usedVariableDefinitions?.length ?? 0), | ||
() => `Should have found all used variables ${[...usedVariables]} in definitions ${JSON.stringify(variableDefinitions)}`, | ||
@@ -277,5 +277,2 @@ ); | ||
} | ||
if(errors.length > 0) { | ||
span.setStatus({ code:SpanStatusCode.ERROR }); | ||
} | ||
return errors.length === 0 ? { data } : { errors, data }; | ||
@@ -386,3 +383,3 @@ }); | ||
case 'Condition': { | ||
const condition = evaluateCondition(node, context.operation.variableDefinitions, context.requestContext.request.variables); | ||
const condition = evaluateCondition(node, context.operation.variableDefinitions, context.requestContext.request.variables); | ||
const pickedBranch = condition ? node.ifClause : node.elseClause; | ||
@@ -389,0 +386,0 @@ let branchTraceNode: Trace.QueryPlanNode | undefined = undefined; |
@@ -67,2 +67,3 @@ import * as makeFetchHappen from 'make-fetch-happen'; | ||
private pollIntervalMs: number = UplinkSupergraphManager.MIN_POLL_INTERVAL_MS; | ||
private fallbackPollIntervalInMs?: number; | ||
private logger: Logger; | ||
@@ -121,2 +122,3 @@ private update?: SupergraphSdlUpdateFunction; | ||
this.pollIntervalMs = fallbackPollIntervalInMs ?? this.pollIntervalMs; | ||
this.fallbackPollIntervalInMs = fallbackPollIntervalInMs; | ||
if (this.pollIntervalMs < UplinkSupergraphManager.MIN_POLL_INTERVAL_MS) { | ||
@@ -234,2 +236,13 @@ this.logger.warn( | ||
this.pollIntervalMs = result.minDelaySeconds * 1000; | ||
// We only want to take the max of the two _if_ a fallback interval is | ||
// configured. If we take the max above unconditionally, then a gateway | ||
// with an unconfigured fallback interval will only ever lengthen its | ||
// poll interval rather than adapt to changes coming from Uplink. | ||
if (this.fallbackPollIntervalInMs) { | ||
this.pollIntervalMs = Math.max( | ||
this.pollIntervalMs, | ||
this.fallbackPollIntervalInMs, | ||
); | ||
} | ||
} | ||
@@ -236,0 +249,0 @@ } catch (e) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
462808
8185
+ Added@apollo/composition@2.4.12(transitive)
+ Added@apollo/federation-internals@2.4.12(transitive)
+ Added@apollo/query-graphs@2.4.12(transitive)
+ Added@apollo/query-planner@2.4.12(transitive)
- Removed@apollo/composition@2.4.11(transitive)
- Removed@apollo/federation-internals@2.4.11(transitive)
- Removed@apollo/query-graphs@2.4.11(transitive)
- Removed@apollo/query-planner@2.4.11(transitive)
Updated@apollo/composition@2.4.12
Updated@apollo/query-planner@2.4.12