Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@apollo/federation-internals

Package Overview
Dependencies
Maintainers
1
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apollo/federation-internals - npm Package Compare versions

Comparing version 2.0.0-preview.12 to 2.0.0-preview.13

4

CHANGELOG.md
# CHANGELOG for `@apollo/federation-internals`
## v2.0.0-preview.13
- Released in sync with other federation packages but no changes to this package.
## v2.0.0-preview.12

@@ -4,0 +8,0 @@

@@ -208,4 +208,15 @@ "use strict";

this.renameFederationTypes();
(0, federation_1.setSchemaAsFed2Subgraph)(this.schema);
this.subgraph = new federation_1.Subgraph(originalSubgraph.name, originalSubgraph.url, this.schema);
try {
(0, federation_1.setSchemaAsFed2Subgraph)(this.schema);
}
catch (e) {
const causes = (0, definitions_1.errorCauses)(e);
if (causes) {
causes.forEach((c) => this.addError(c));
}
else {
throw e;
}
}
this.metadata = this.subgraph.metadata();

@@ -212,0 +223,0 @@ }

6

package.json
{
"name": "@apollo/federation-internals",
"version": "2.0.0-preview.12",
"version": "2.0.0-preview.13",
"description": "Apollo Federation internal utilities",

@@ -26,3 +26,3 @@ "main": "dist/index.js",

"dependencies": {
"@apollo/core-schema": "^0.3",
"@apollo/core-schema": "~0.2.3",
"chalk": "^4.1.0",

@@ -37,3 +37,3 @@ "js-levenshtein": "^1.1.6"

},
"gitHead": "408012182a81d42c7a17abee200064af9205f393"
"gitHead": "c0209dbd6ab3e96584a37b27ab1cd94d4634751e"
}

@@ -281,4 +281,24 @@ import {

this.renameFederationTypes();
setSchemaAsFed2Subgraph(this.schema);
// Setting this property before trying to switch the cloned schema to fed2 because on
// errors `addError` uses `this.subgraph.name`.
this.subgraph = new Subgraph(originalSubgraph.name, originalSubgraph.url, this.schema);
try {
setSchemaAsFed2Subgraph(this.schema);
} catch (e) {
// This could error out if some directive definition clashes with a federation one while
// having an incompatible definition. Note that in that case, the choices for the user
// are either:
// 1. fix/remove the definition if they did meant the federation directive, just had an
// invalid definition.
// 2. but if they have their own directive whose name happens to clash with a federation
// directive one but is genuinely a different directive, they will have to move their
// schema to a fed2 one and use renaming.
const causes = errorCauses(e);
if (causes) {
causes.forEach((c) => this.addError(c));
} else {
// An unexpected exception, rethrow.
throw e;
}
}
this.metadata = this.subgraph.metadata();

@@ -285,0 +305,0 @@ }

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc