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

@apollo/query-graphs

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/query-graphs - npm Package Compare versions

Comparing version 2.3.5 to 2.3.6

11

CHANGELOG.md
# CHANGELOG for `@apollo/query-graphs`
## 2.3.6
### Patch Changes
- Fix issues (incorrectly rejected composition and/or subgraph errors) with `@interfaceObject`. Those issues may occur ([`11f2d7c0`](https://github.com/apollographql/federation/commit/11f2d7c0a1548e086f108f1e543da808de2a38b2))
either due to some use of `@requires` in an `@interfaceObject` type, or when some subgraph `S` defines a type that is an
implementation of an interface `I` in the supergraph, and there is an `@interfaceObject` for `I` in another subgraph,
but `S` does not itself defines `I`.
- Updated dependencies [[`98844fd5`](https://github.com/apollographql/federation/commit/98844fd511050678cc39cbbf86f5dc6d739f1923), [`11f2d7c0`](https://github.com/apollographql/federation/commit/11f2d7c0a1548e086f108f1e543da808de2a38b2), [`2894a1ea`](https://github.com/apollographql/federation/commit/2894a1ea666d2f2f0cb50e1dc4147a29cb32bca6)]:
- @apollo/federation-internals@2.3.6
## 2.3.5

@@ -4,0 +15,0 @@ ### Patch Changes

28

dist/querygraph.js

@@ -257,17 +257,23 @@ "use strict";

const conditions = (0, federation_internals_1.parseFieldSetArgument)({ parentType: type, directive: keyApplication });
const tail = copyPointers[i].copiedVertex(v);
for (const [j, otherSubgraph] of subgraphs.entries()) {
const otherVertices = otherSubgraph.verticesForType(type.name);
if (otherVertices.length == 0) {
continue;
if (otherVertices.length > 0) {
(0, federation_internals_1.assert)(otherVertices.length == 1, () => `Subgraph ${j} should have a single vertex for type ${type.name} but got ${otherVertices.length}: ${(0, util_1.inspect)(otherVertices)}`);
const otherVertex = otherVertices[0];
const head = copyPointers[j].copiedVertex(otherVertex);
const tail = copyPointers[i].copiedVertex(v);
builder.addEdge(head, tail, new transition_1.KeyResolution(), conditions);
}
(0, federation_internals_1.assert)(otherVertices.length == 1, () => `Subgraph ${j} should have a single vertex for type ${type.name} but got ${otherVertices.length}: ${(0, util_1.inspect)(otherVertices)}`);
const otherVertice = otherVertices[0];
const head = copyPointers[j].copiedVertex(otherVertice);
const tail = copyPointers[i].copiedVertex(v);
builder.addEdge(head, tail, new transition_1.KeyResolution(), conditions);
const otherType = otherVertice.type;
if (isInterfaceObject && (0, federation_internals_1.isInterfaceType)(otherType)) {
for (const implemType of otherType.possibleRuntimeTypes()) {
const implemVertice = otherSubgraph.verticesForType(implemType.name)[0];
if (isInterfaceObject) {
const typeInSupergraph = supergraph.type(type.name);
(0, federation_internals_1.assert)(typeInSupergraph && (0, federation_internals_1.isInterfaceType)(typeInSupergraph), () => `Type ${type} is an interfaceObject in subgraph ${i}; should be an interface in the supergraph`);
for (const implemTypeInSupergraph of typeInSupergraph.possibleRuntimeTypes()) {
const implemVertice = otherSubgraph.verticesForType(implemTypeInSupergraph.name)[0];
if (!implemVertice) {
continue;
}
const implemHead = copyPointers[j].copiedVertex(implemVertice);
const implemType = implemVertice.type;
(0, federation_internals_1.assert)((0, federation_internals_1.isCompositeType)(implemType), () => `${implemType} should be composite since it implements ${typeInSupergraph} in the supergraph`);
try {

@@ -274,0 +280,0 @@ const implConditions = (0, federation_internals_1.parseFieldSetArgument)({ parentType: implemType, directive: keyApplication, validate: false });

{
"name": "@apollo/query-graphs",
"version": "2.3.5",
"version": "2.3.6",
"description": "Apollo Federation library to work with 'query graphs'",

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

"dependencies": {
"@apollo/federation-internals": "2.3.5",
"@apollo/federation-internals": "2.3.6",
"deep-equal": "^2.0.5",

@@ -29,0 +29,0 @@ "ts-graphviz": "^1.5.4",

Sorry, the diff of this file is too big to display

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 too big to display

Sorry, the diff of this file is too big to display

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