@apollo/gateway 0.300.0-alpha.2 → 2.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +95 -0
- package/README.md +1 -1
- package/dist/__generated__/graphqlTypes.d.ts +130 -0
- package/dist/__generated__/graphqlTypes.d.ts.map +1 -0
- package/dist/__generated__/graphqlTypes.js +25 -0
- package/dist/__generated__/graphqlTypes.js.map +1 -0
- package/dist/config.d.ts +104 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +47 -0
- package/dist/config.js.map +1 -0
- package/dist/datasources/LocalGraphQLDataSource.d.ts +3 -3
- package/dist/datasources/LocalGraphQLDataSource.d.ts.map +1 -1
- package/dist/datasources/LocalGraphQLDataSource.js +5 -5
- package/dist/datasources/LocalGraphQLDataSource.js.map +1 -1
- package/dist/datasources/RemoteGraphQLDataSource.d.ts +6 -4
- package/dist/datasources/RemoteGraphQLDataSource.d.ts.map +1 -1
- package/dist/datasources/RemoteGraphQLDataSource.js +60 -17
- package/dist/datasources/RemoteGraphQLDataSource.js.map +1 -1
- package/dist/datasources/index.d.ts +1 -1
- package/dist/datasources/index.d.ts.map +1 -1
- package/dist/datasources/index.js +1 -0
- package/dist/datasources/index.js.map +1 -1
- package/dist/datasources/parseCacheControlHeader.d.ts +2 -0
- package/dist/datasources/parseCacheControlHeader.d.ts.map +1 -0
- package/dist/datasources/parseCacheControlHeader.js +16 -0
- package/dist/datasources/parseCacheControlHeader.js.map +1 -0
- package/dist/datasources/types.d.ts +16 -1
- package/dist/datasources/types.d.ts.map +1 -1
- package/dist/datasources/types.js +7 -0
- package/dist/datasources/types.js.map +1 -1
- package/dist/executeQueryPlan.d.ts +2 -1
- package/dist/executeQueryPlan.d.ts.map +1 -1
- package/dist/executeQueryPlan.js +199 -112
- package/dist/executeQueryPlan.js.map +1 -1
- package/dist/index.d.ts +62 -80
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +543 -234
- package/dist/index.js.map +1 -1
- package/dist/loadServicesFromRemoteEndpoint.d.ts +9 -9
- package/dist/loadServicesFromRemoteEndpoint.d.ts.map +1 -1
- package/dist/loadServicesFromRemoteEndpoint.js +13 -8
- package/dist/loadServicesFromRemoteEndpoint.js.map +1 -1
- package/dist/loadSupergraphSdlFromStorage.d.ts +13 -0
- package/dist/loadSupergraphSdlFromStorage.d.ts.map +1 -0
- package/dist/loadSupergraphSdlFromStorage.js +101 -0
- package/dist/loadSupergraphSdlFromStorage.js.map +1 -0
- package/dist/operationContext.d.ts +17 -0
- package/dist/operationContext.d.ts.map +1 -0
- package/dist/operationContext.js +42 -0
- package/dist/operationContext.js.map +1 -0
- package/dist/outOfBandReporter.d.ts +15 -0
- package/dist/outOfBandReporter.d.ts.map +1 -0
- package/dist/outOfBandReporter.js +88 -0
- package/dist/outOfBandReporter.js.map +1 -0
- package/dist/utilities/array.d.ts +1 -2
- package/dist/utilities/array.d.ts.map +1 -1
- package/dist/utilities/array.js +7 -14
- package/dist/utilities/array.js.map +1 -1
- package/dist/utilities/assert.d.ts +2 -0
- package/dist/utilities/assert.d.ts.map +1 -0
- package/dist/utilities/assert.js +10 -0
- package/dist/utilities/assert.js.map +1 -0
- package/dist/utilities/cleanErrorOfInaccessibleNames.d.ts +3 -0
- package/dist/utilities/cleanErrorOfInaccessibleNames.d.ts.map +1 -0
- package/dist/utilities/cleanErrorOfInaccessibleNames.js +27 -0
- package/dist/utilities/cleanErrorOfInaccessibleNames.js.map +1 -0
- package/dist/utilities/deepMerge.js +2 -2
- package/dist/utilities/deepMerge.js.map +1 -1
- package/dist/utilities/graphql.d.ts +1 -4
- package/dist/utilities/graphql.d.ts.map +1 -1
- package/dist/utilities/graphql.js +3 -36
- package/dist/utilities/graphql.js.map +1 -1
- package/dist/utilities/opentelemetry.d.ts +10 -0
- package/dist/utilities/opentelemetry.d.ts.map +1 -0
- package/dist/utilities/opentelemetry.js +19 -0
- package/dist/utilities/opentelemetry.js.map +1 -0
- package/package.json +30 -21
- package/src/__generated__/graphqlTypes.ts +140 -0
- package/src/__mocks__/apollo-server-env.ts +56 -0
- package/src/__mocks__/make-fetch-happen-fetcher.ts +55 -0
- package/src/__mocks__/tsconfig.json +7 -0
- package/src/__tests__/build-query-plan.feature +40 -311
- package/src/__tests__/buildQueryPlan.test.ts +246 -426
- package/src/__tests__/executeQueryPlan.test.ts +1691 -194
- package/src/__tests__/execution-utils.ts +33 -26
- package/src/__tests__/gateway/__snapshots__/opentelemetry.test.ts.snap +195 -0
- package/src/__tests__/gateway/buildService.test.ts +16 -19
- package/src/__tests__/gateway/composedSdl.test.ts +44 -0
- package/src/__tests__/gateway/endToEnd.test.ts +166 -0
- package/src/__tests__/gateway/executor.test.ts +49 -43
- package/src/__tests__/gateway/lifecycle-hooks.test.ts +58 -29
- package/src/__tests__/gateway/opentelemetry.test.ts +123 -0
- package/src/__tests__/gateway/queryPlanCache.test.ts +19 -20
- package/src/__tests__/gateway/reporting.test.ts +76 -55
- package/src/__tests__/integration/abstract-types.test.ts +1086 -22
- package/src/__tests__/integration/aliases.test.ts +5 -6
- package/src/__tests__/integration/boolean.test.ts +40 -38
- package/src/__tests__/integration/complex-key.test.ts +41 -56
- package/src/__tests__/integration/configuration.test.ts +321 -0
- package/src/__tests__/integration/custom-directives.test.ts +61 -46
- package/src/__tests__/integration/fragments.test.ts +8 -2
- package/src/__tests__/integration/list-key.test.ts +2 -2
- package/src/__tests__/integration/logger.test.ts +2 -2
- package/src/__tests__/integration/multiple-key.test.ts +11 -12
- package/src/__tests__/integration/mutations.test.ts +8 -5
- package/src/__tests__/integration/networkRequests.test.ts +447 -289
- package/src/__tests__/integration/nockMocks.ts +95 -66
- package/src/__tests__/integration/provides.test.ts +9 -6
- package/src/__tests__/integration/requires.test.ts +17 -15
- package/src/__tests__/integration/scope.test.ts +557 -0
- package/src/__tests__/integration/unions.test.ts +1 -1
- package/src/__tests__/integration/value-types.test.ts +35 -32
- package/src/__tests__/integration/variables.test.ts +8 -2
- package/src/__tests__/loadServicesFromRemoteEndpoint.test.ts +6 -2
- package/src/__tests__/loadSupergraphSdlFromStorage.test.ts +694 -0
- package/src/__tests__/queryPlanCucumber.test.ts +11 -61
- package/src/__tests__/testSetup.ts +1 -4
- package/src/__tests__/tsconfig.json +2 -1
- package/src/config.ts +225 -0
- package/src/core/__tests__/core.test.ts +412 -0
- package/src/datasources/LocalGraphQLDataSource.ts +9 -10
- package/src/datasources/RemoteGraphQLDataSource.ts +117 -43
- package/src/datasources/__tests__/LocalGraphQLDataSource.test.ts +11 -4
- package/src/datasources/__tests__/RemoteGraphQLDataSource.test.ts +148 -79
- package/src/datasources/__tests__/tsconfig.json +4 -2
- package/src/datasources/index.ts +1 -1
- package/src/datasources/parseCacheControlHeader.ts +43 -0
- package/src/datasources/types.ts +47 -2
- package/src/executeQueryPlan.ts +264 -153
- package/src/index.ts +925 -480
- package/src/loadServicesFromRemoteEndpoint.ts +24 -17
- package/src/loadSupergraphSdlFromStorage.ts +140 -0
- package/src/make-fetch-happen.d.ts +2 -2
- package/src/operationContext.ts +70 -0
- package/src/outOfBandReporter.ts +128 -0
- package/src/utilities/__tests__/cleanErrorOfInaccessibleElements.test.ts +104 -0
- package/src/utilities/__tests__/tsconfig.json +8 -0
- package/src/utilities/array.ts +6 -28
- package/src/utilities/assert.ts +14 -0
- package/src/utilities/cleanErrorOfInaccessibleNames.ts +29 -0
- package/src/utilities/graphql.ts +0 -64
- package/src/utilities/opentelemetry.ts +13 -0
- package/CHANGELOG.md +0 -226
- package/LICENSE.md +0 -20
- package/dist/FieldSet.d.ts +0 -18
- package/dist/FieldSet.d.ts.map +0 -1
- package/dist/FieldSet.js +0 -96
- package/dist/FieldSet.js.map +0 -1
- package/dist/QueryPlan.d.ts +0 -41
- package/dist/QueryPlan.d.ts.map +0 -1
- package/dist/QueryPlan.js +0 -15
- package/dist/QueryPlan.js.map +0 -1
- package/dist/buildQueryPlan.d.ts +0 -44
- package/dist/buildQueryPlan.d.ts.map +0 -1
- package/dist/buildQueryPlan.js +0 -670
- package/dist/buildQueryPlan.js.map +0 -1
- package/dist/loadServicesFromStorage.d.ts +0 -21
- package/dist/loadServicesFromStorage.d.ts.map +0 -1
- package/dist/loadServicesFromStorage.js +0 -64
- package/dist/loadServicesFromStorage.js.map +0 -1
- package/dist/snapshotSerializers/astSerializer.d.ts +0 -3
- package/dist/snapshotSerializers/astSerializer.d.ts.map +0 -1
- package/dist/snapshotSerializers/astSerializer.js +0 -14
- package/dist/snapshotSerializers/astSerializer.js.map +0 -1
- package/dist/snapshotSerializers/index.d.ts +0 -13
- package/dist/snapshotSerializers/index.d.ts.map +0 -1
- package/dist/snapshotSerializers/index.js +0 -15
- package/dist/snapshotSerializers/index.js.map +0 -1
- package/dist/snapshotSerializers/queryPlanSerializer.d.ts +0 -3
- package/dist/snapshotSerializers/queryPlanSerializer.d.ts.map +0 -1
- package/dist/snapshotSerializers/queryPlanSerializer.js +0 -78
- package/dist/snapshotSerializers/queryPlanSerializer.js.map +0 -1
- package/dist/snapshotSerializers/selectionSetSerializer.d.ts +0 -3
- package/dist/snapshotSerializers/selectionSetSerializer.d.ts.map +0 -1
- package/dist/snapshotSerializers/selectionSetSerializer.js +0 -12
- package/dist/snapshotSerializers/selectionSetSerializer.js.map +0 -1
- package/dist/snapshotSerializers/typeSerializer.d.ts +0 -3
- package/dist/snapshotSerializers/typeSerializer.d.ts.map +0 -1
- package/dist/snapshotSerializers/typeSerializer.js +0 -12
- package/dist/snapshotSerializers/typeSerializer.js.map +0 -1
- package/dist/utilities/MultiMap.d.ts +0 -4
- package/dist/utilities/MultiMap.d.ts.map +0 -1
- package/dist/utilities/MultiMap.js +0 -17
- package/dist/utilities/MultiMap.js.map +0 -1
- package/src/FieldSet.ts +0 -169
- package/src/QueryPlan.ts +0 -57
- package/src/__tests__/matchers/toCallService.ts +0 -105
- package/src/__tests__/matchers/toHaveBeenCalledBefore.ts +0 -40
- package/src/__tests__/matchers/toHaveFetched.ts +0 -81
- package/src/__tests__/matchers/toMatchAST.ts +0 -64
- package/src/buildQueryPlan.ts +0 -1190
- package/src/loadServicesFromStorage.ts +0 -170
- package/src/snapshotSerializers/astSerializer.ts +0 -21
- package/src/snapshotSerializers/index.ts +0 -21
- package/src/snapshotSerializers/queryPlanSerializer.ts +0 -144
- package/src/snapshotSerializers/selectionSetSerializer.ts +0 -13
- package/src/snapshotSerializers/typeSerializer.ts +0 -11
- package/src/utilities/MultiMap.ts +0 -11
package/src/utilities/graphql.ts
CHANGED
|
@@ -1,69 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ASTNode,
|
|
3
3
|
FieldNode,
|
|
4
|
-
GraphQLCompositeType,
|
|
5
|
-
GraphQLField,
|
|
6
|
-
GraphQLInterfaceType,
|
|
7
4
|
GraphQLNullableType,
|
|
8
|
-
GraphQLObjectType,
|
|
9
|
-
GraphQLSchema,
|
|
10
5
|
GraphQLType,
|
|
11
|
-
GraphQLUnionType,
|
|
12
6
|
isListType,
|
|
13
7
|
isNonNullType,
|
|
14
8
|
Kind,
|
|
15
9
|
ListTypeNode,
|
|
16
10
|
NamedTypeNode,
|
|
17
|
-
OperationDefinitionNode,
|
|
18
|
-
parse,
|
|
19
|
-
print,
|
|
20
|
-
SchemaMetaFieldDef,
|
|
21
|
-
SelectionNode,
|
|
22
|
-
TypeMetaFieldDef,
|
|
23
|
-
TypeNameMetaFieldDef,
|
|
24
11
|
TypeNode,
|
|
25
12
|
} from 'graphql';
|
|
26
13
|
|
|
27
|
-
/**
|
|
28
|
-
* Not exactly the same as the executor's definition of getFieldDef, in this
|
|
29
|
-
* statically evaluated environment we do not always have an Object type,
|
|
30
|
-
* and need to handle Interface and Union types.
|
|
31
|
-
*/
|
|
32
|
-
export function getFieldDef(
|
|
33
|
-
schema: GraphQLSchema,
|
|
34
|
-
parentType: GraphQLCompositeType,
|
|
35
|
-
fieldName: string,
|
|
36
|
-
): GraphQLField<any, any> | undefined {
|
|
37
|
-
if (
|
|
38
|
-
fieldName === SchemaMetaFieldDef.name &&
|
|
39
|
-
schema.getQueryType() === parentType
|
|
40
|
-
) {
|
|
41
|
-
return SchemaMetaFieldDef;
|
|
42
|
-
}
|
|
43
|
-
if (
|
|
44
|
-
fieldName === TypeMetaFieldDef.name &&
|
|
45
|
-
schema.getQueryType() === parentType
|
|
46
|
-
) {
|
|
47
|
-
return TypeMetaFieldDef;
|
|
48
|
-
}
|
|
49
|
-
if (
|
|
50
|
-
fieldName === TypeNameMetaFieldDef.name &&
|
|
51
|
-
(parentType instanceof GraphQLObjectType ||
|
|
52
|
-
parentType instanceof GraphQLInterfaceType ||
|
|
53
|
-
parentType instanceof GraphQLUnionType)
|
|
54
|
-
) {
|
|
55
|
-
return TypeNameMetaFieldDef;
|
|
56
|
-
}
|
|
57
|
-
if (
|
|
58
|
-
parentType instanceof GraphQLObjectType ||
|
|
59
|
-
parentType instanceof GraphQLInterfaceType
|
|
60
|
-
) {
|
|
61
|
-
return parentType.getFields()[fieldName];
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return undefined;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
14
|
export function getResponseName(node: FieldNode): string {
|
|
68
15
|
return node.alias ? node.alias.value : node.name.value;
|
|
69
16
|
}
|
|
@@ -90,14 +37,3 @@ export function astFromType(type: GraphQLType): TypeNode {
|
|
|
90
37
|
};
|
|
91
38
|
}
|
|
92
39
|
}
|
|
93
|
-
|
|
94
|
-
export function printWithReducedWhitespace(ast: ASTNode): string {
|
|
95
|
-
return print(ast)
|
|
96
|
-
.replace(/\s+/g, ' ')
|
|
97
|
-
.trim();
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export function parseSelections(source: string): ReadonlyArray<SelectionNode> {
|
|
101
|
-
return (parse(`query { ${source} }`)
|
|
102
|
-
.definitions[0] as OperationDefinitionNode).selectionSet.selections;
|
|
103
|
-
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import opentelemetry from '@opentelemetry/api';
|
|
2
|
+
|
|
3
|
+
export enum OpenTelemetrySpanNames {
|
|
4
|
+
REQUEST = 'gateway.request',
|
|
5
|
+
PLAN = 'gateway.plan',
|
|
6
|
+
FETCH = 'gateway.fetch',
|
|
7
|
+
POST_PROCESSING = 'gateway.postprocessing',
|
|
8
|
+
EXECUTE = 'gateway.execute',
|
|
9
|
+
VALIDATE = 'gateway.validate',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { name, version } = require('../../package.json');
|
|
13
|
+
export const tracer = opentelemetry.trace.getTracer(`${name}/${version}`);
|
package/CHANGELOG.md
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
# CHANGELOG for `@apollo/gateway`
|
|
2
|
-
|
|
3
|
-
## vNEXT
|
|
4
|
-
|
|
5
|
-
> The changes noted within this `vNEXT` section have not been released yet. New PRs and commits which introduce changes should include an entry in this `vNEXT` section as part of their development. When a release is being prepared, a new header will be (manually) created below and the appropriate changes within that release will be moved into the new section.
|
|
6
|
-
|
|
7
|
-
- _Nothing yet! Stay tuned!_
|
|
8
|
-
|
|
9
|
-
## v0.19.0
|
|
10
|
-
|
|
11
|
-
- Only changes in the similarly versioned `@apollo/federation` package.
|
|
12
|
-
|
|
13
|
-
## v0.18.1
|
|
14
|
-
|
|
15
|
-
- __FIX__: Pass null required fields correctly within the parent object to resolvers. When a composite field was null, it would sometimes be expanded into an object with all null subfields and passed to the resolver. This fix prevents this expansion and sets the field to null, as originally intended. [PR #4157](https://github.com/apollographql/apollo-server/pull/4157)
|
|
16
|
-
- __FIX__: Prevent gateway from entering an inoperable state after an initial configuration load failure. [PR #4277](https://github.com/apollographql/apollo-server/pull/4277)
|
|
17
|
-
|
|
18
|
-
## v0.18.0
|
|
19
|
-
|
|
20
|
-
- The `RemoteGraphQLDataSource`'s `didEncounterError` method will now receive [`Response`](https://github.com/apollographql/apollo-server/blob/43470d6561bee31101f3afc56bdd154db3f92b30/packages/apollo-server-env/src/fetch.d.ts#L98-L111) as the third argument when it is available, making its signature `(error: Error, fetchRequest: Request, fetchResponse?: Response)`. This compliments the existing [`Request`](https://github.com/apollographql/apollo-server/blob/43470d6561bee31101f3afc56bdd154db3f92b30/packages/apollo-server-env/src/fetch.d.ts#L37-L45) type it was already receiving. Both of these types are [HTTP WHATWG Fetch API](https://fetch.spec.whatwg.org/) types, not `GraphQLRequest`, `GraphQLResponse` types.
|
|
21
|
-
|
|
22
|
-
## v0.17.0
|
|
23
|
-
|
|
24
|
-
- __BREAKING__: Move federation metadata from custom objects on schema nodes over to the `extensions` field on schema nodes which are intended for metadata. This is a breaking change because it narrows the `graphql` peer dependency from `^14.0.2` to `^14.5.0` which is when [`extensions` were introduced](https://github.com/graphql/graphql-js/pull/2097) for all Type System objects. [PR #4313](https://github.com/apollographql/apollo-server/pull/4313)
|
|
25
|
-
|
|
26
|
-
## v0.16.11
|
|
27
|
-
|
|
28
|
-
- Only changes in the similarly versioned `@apollo/federation` package.
|
|
29
|
-
|
|
30
|
-
## v0.16.10
|
|
31
|
-
|
|
32
|
-
- The default branch of the repository has been changed to `main`. As this changed a number of references in the repository's `package.json` and `README.md` files (e.g., for badges, links, etc.), this necessitates a release to publish those changes to npm. [PR #4302](https://github.com/apollographql/apollo-server/pull/4302)
|
|
33
|
-
- __FIX__: The cache implementation for the HTTP-fetcher which is used when communicating with the Apollo Registry when the gateway is configured to use [managed federation](https://www.apollographql.com/docs/graph-manager/managed-federation/overview/) will no longer write to its cache when it receives a 304 response. This is necessary since such a response indicates that the cache used to conditionally make the request must already be present. This does not affect GraphQL requests at runtime, only the polling and fetching mechanism for retrieving composed schemas under manged federation. [PR #4325](https://github.com/apollographql/apollo-server/pull/4325)
|
|
34
|
-
- __FIX__: The `mergeFieldNodeSelectionSets` method no longer mutates original FieldNode objects. Before, it was updating the selection set of the original object, corrupting the data accross requests.
|
|
35
|
-
|
|
36
|
-
## v0.16.9
|
|
37
|
-
|
|
38
|
-
- Only changes in the similarly versioned `@apollo/federation` package.
|
|
39
|
-
|
|
40
|
-
## v0.16.7
|
|
41
|
-
|
|
42
|
-
- Bumped the version of `apollo-server-core`, but no other changes!
|
|
43
|
-
|
|
44
|
-
## v0.16.6
|
|
45
|
-
|
|
46
|
-
- Only changes in the similarly versioned `@apollo/federation` package.
|
|
47
|
-
|
|
48
|
-
## v0.16.5
|
|
49
|
-
|
|
50
|
-
- Only changes in the similarly versioned `@apollo/federation` package.
|
|
51
|
-
|
|
52
|
-
## v0.16.4
|
|
53
|
-
|
|
54
|
-
- __NEW__: Provide the `requestContext` as an argument to the experimental callback function `experimental_didResolveQueryPlan`. [#4173](https://github.com/apollographql/apollo-server/pull/4173)
|
|
55
|
-
|
|
56
|
-
## v0.16.3
|
|
57
|
-
|
|
58
|
-
- This updates a dependency of `apollo-server-core` that is only used for its TypeScript typings, not for any runtime dependencies. The reason for the upgrade is that the `apollo-server-core` package (again, used only for types!) was affected by a GitHub Security Advisory. [See the related `CHANGELOG.md` for Apollo Server for more details, including a link to the advisory](https://github.com/apollographql/apollo-server/blob/354d9910e1c87af93c7d50263a28554b449e48db/CHANGELOG.md#v2142).
|
|
59
|
-
|
|
60
|
-
## v0.16.2
|
|
61
|
-
|
|
62
|
-
- __FIX__: Collapse nested required fields into a single body in the query plan. Before, some nested fields' selection sets were getting split, causing some of their subfields to be dropped when executing the query. This fix collapses the split selection sets into one. [#4064](https://github.com/apollographql/apollo-server/pull/4064)
|
|
63
|
-
|
|
64
|
-
## v0.16.1
|
|
65
|
-
|
|
66
|
-
- __NEW__: Provide the ability to pass a custom `fetcher` during `RemoteGraphQLDataSource` construction to be used when executing operations against downstream services. Providing a custom `fetcher` may be necessary to accommodate more advanced needs, e.g., configuring custom TLS certificates for internal services. [PR #4149](https://github.com/apollographql/apollo-server/pull/4149)
|
|
67
|
-
|
|
68
|
-
The `fetcher` specified should be a compliant implementor of the [Fetch API standard](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This addition compliments, though is still orthognonal to, similar behavior originally introduced in [#3783](https://github.com/apollographql/apollo-server/pull/3783), which allowed customization of the implementation used to fetch _gateway configuration and federated SDL from services_ in managed and unmanaged modes, but didn't affect the communication that takes place during _operation execution_.
|
|
69
|
-
|
|
70
|
-
For now, the default `fetcher` will remain the same ([`node-fetch`](https://npm.im/node-fetch)) implementation. A future major-version bump will update it to be consistent with other feature-rich implementations of the Fetch API which are used elsewhere in the Apollo Server stack where we use [`make-fetch-happen`](https://npm.im/make-fetch-happen). In all likelihood, `ApolloGateway` will pass its own `fetcher` to the `RemoteGraphQLDataSource` during service initialization.
|
|
71
|
-
|
|
72
|
-
## v0.16.0
|
|
73
|
-
|
|
74
|
-
- __BREAKING__: Use a content delivery network for managed configuration, fetch storage secrets and composition configuration from different domains: https://storage-secrets.api.apollographql.com and https://federation.api.apollographql.com. Please mind any firewall for outgoing traffic. [#4080](https://github.com/apollographql/apollo-server/pull/4080)
|
|
75
|
-
|
|
76
|
-
## v0.15.1
|
|
77
|
-
|
|
78
|
-
- __FIX__: Correctly handle unions with nested conditions that have no `possibleTypes` [#4071](https://github.com/apollographql/apollo-server/pull/4071)
|
|
79
|
-
- __FIX__: Normalize root operation types when reporting to Apollo Graph Manager. Federation always uses the default names `Query`, `Mutation`, and `Subscription` for root operation types even if downstream services choose different names; now we properly normalize traces received from downstream services in the same way. [#4100](https://github.com/apollographql/apollo-server/pull/4100)
|
|
80
|
-
|
|
81
|
-
## v0.15.0
|
|
82
|
-
|
|
83
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/e37384a49b2bf474eed0de3e9f4a1bebaeee64c7)
|
|
84
|
-
|
|
85
|
-
- __BREAKING__: Drop support for Node.js 8 and Node.js 10. This is being done primarily for performance gains which stand to be seen by transpiling to a newer ECMAScript target. For more details, see the related PR. [#4031](https://github.com/apollographql/apollo-server/pull/4031)
|
|
86
|
-
- __Performance:__ Cache stringified representations of downstream query bodies within the query plan to address performance cost incurred by repeatedly `print`ing the same`DocumentNode`s with the `graphql` printer. This improvement is more pronounced on larger documents. [PR #4018](https://github.com/apollographql/apollo-server/pull/4018)
|
|
87
|
-
- __Deprecation:__ Deprecated the `ENGINE_API_KEY` environment variable in favor of its new name, `APOLLO_KEY`. The new name mirrors the name used within Apollo Graph Manager. Aside from the rename, the functionality remains otherwise identical. Continued use of `ENGINE_API_KEY` will result in deprecation warnings being printed to the server console. Support for `ENGINE_API_KEY` will be removed in a future, major update. [#3923](https://github.com/apollographql/apollo-server/pull/3923)
|
|
88
|
-
- __Deprecation:__ Deprecated the `APOLLO_SCHEMA_TAG` environment variable in favor of its new name, `APOLLO_GRAPH_VARIANT`. The new name mirrors the name used within Apollo Graph Manager. Aside from the rename, the functionality remains otherwise identical. Use of the now-deprecated name will result in a deprecation warning being printed to the server console. Support will be removed entirely in a future, major update. To avoid misconfiguration, runtime errors will be thrown if the new and deprecated versions are _both_ set. [#3855](https://github.com/apollographql/apollo-server/pull/3855)
|
|
89
|
-
- Add inadvertently excluded `apollo-server-errors` runtime dependency. [#3927](https://github.com/apollographql/apollo-server/pull/3927)
|
|
90
|
-
|
|
91
|
-
## v0.14.1
|
|
92
|
-
|
|
93
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/b898396e9fcd3b9092b168f9aac8466ca186fa6b)
|
|
94
|
-
|
|
95
|
-
- __FIX__: Resolve condition which surfaced in `0.14.0` which prevented loading the configuration using managed federation. [PR #3979](https://github.com/apollographql/apollo-server/pull/3979)
|
|
96
|
-
|
|
97
|
-
## v0.14.0
|
|
98
|
-
|
|
99
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/71a3863f59f4ab2c9052c316479d94c6708c4309)
|
|
100
|
-
|
|
101
|
-
- Several previously unhandled Promise rejection errors stemming from, e.g. connectivity, failures when communicating with Apollo Graph Manager within asynchronous code are now handled. [PR #3811](https://github.com/apollographql/apollo-server/pull/3811)
|
|
102
|
-
- Provide a more helpful error message when encountering expected errors. [PR #3811](https://github.com/apollographql/apollo-server/pull/3811)
|
|
103
|
-
- General improvements and clarity to error messages and logging. [PR #3811](https://github.com/apollographql/apollo-server/pull/3811)
|
|
104
|
-
- Warn of a possible misconfiguration when local service configuration is provided (via `serviceList` or `localServiceList`) and a remote Apollo Graph Manager configuration is subsequently found as well. [PR #3868](https://github.com/apollographql/apollo-server/pull/3868)
|
|
105
|
-
- During composition, the unavailability of a downstream service in unmanaged federation mode will no longer result in a partially composed schema which merely lacks the types provided by the downed service. This prevents unexpected validation errors for clients querying a graph which lacks types which were merely unavailable during the initial composition but were intended to be part of the graph. [PR #3867](https://github.com/apollographql/apollo-server/pull/3867)
|
|
106
|
-
- Support providing a custom logger implementation (e.g. [`winston`](https://npm.im/winston), [`bunyan`](https://npm.im/bunyan), etc.) to capture gateway-sourced console output. This allows the use of existing, production logging facilities or the possibiltiy to use advanced structure in logging, such as console output which is encapsulated in JSON. The same PR that introduces this support also introduces a `logger` property to the `GraphQLRequestContext` that is exposed to `GraphQLDataSource`s and Apollo Server plugins, making it possible to attach additional properties (as supported by the logger implementation) to specific requests, if desired, by leveraging custom implementations in those components respectively. When not provided, these will still output to `console`. [PR #3894](https://github.com/apollographql/apollo-server/pull/3894)
|
|
107
|
-
- Drop use of `loglevel-debug`. This removes the very long date and time prefix in front of each log line and also the support for the `DEBUG=apollo-gateway:` environment variable. Both of these were uncommonly necessary or seldom used (with the environment variable also being undocumented). The existing behavior can be preserved by providing a `logger` that uses `loglevel-debug`, if desired, and more details can be found in the PR. [PR #3896](https://github.com/apollographql/apollo-server/pull/3896)
|
|
108
|
-
- Fix Typescript generic typing for datasource contexts [#3865](https://github.com/apollographql/apollo-server/pull/3865) This is a fix for the `TContext` typings of the gateway's exposed `GraphQLDataSource` implementations. In their current form, they don't work as intended, or in any manner that's useful for typing the `context` property throughout the class methods. This introduces a type argument `TContext` to the class itself (which defaults to `Record<string, any>` for existing implementations) and removes the non-operational type arguments on the class methods themselves.
|
|
109
|
-
- Implement retry logic for requests to GCS [PR #3836](https://github.com/apollographql/apollo-server/pull/3836) Note: coupled with this change is a small alteration in how the gateway polls GCS for updates in managed mode. Previously, the tick was on a specific interval. Now, every tick starts after the round of fetches to GCS completes. For more details, see the linked PR.
|
|
110
|
-
- Gateway issues health checks to downstream services via `serviceHealthCheck` configuration option. Note: expected behavior differs between managed and unmanaged federation. See PR for new test cases and documentation. [#3930](https://github.com/apollographql/apollo-server/pull/3930)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
## v0.13.2
|
|
114
|
-
|
|
115
|
-
- __BREAKING__: The behavior and signature of `RemoteGraphQLDataSource`'s `didReceiveResponse` method has been changed. No changes are necessary _unless_ your implementation has overridden the default behavior of this method by either extending the class and overriding the method or by providing `didReceiveResponse` as a parameter to the `RemoteGraphQLDataSource`'s constructor options. Implementations which have provided their own `didReceiveResponse` using either of these methods should view the PR linked here for details on what has changed. [PR #3743](https://github.com/apollographql/apollo-server/pull/3743)
|
|
116
|
-
- __NEW__: Setting the `apq` option to `true` on the `RemoteGraphQLDataSource` will enable the use of [automated persisted queries (APQ)](https://www.apollographql.com/docs/apollo-server/performance/apq/) when sending queries to downstream services. Depending on the complexity of queries sent to downstream services, this technique can greatly reduce the size of the payloads being transmitted over the network. Downstream implementing services must also support APQ functionality to participate in this feature (Apollo Server does by default unless it has been explicitly disabled). As with normal APQ behavior, a downstream server must have received and registered a query once before it will be able to serve an APQ request. [#3744](https://github.com/apollographql/apollo-server/pull/3744)
|
|
117
|
-
- __NEW__: Experimental feature: compress downstream requests via generated fragments [#3791](https://github.com/apollographql/apollo-server/pull/3791) This feature enables the gateway to generate fragments for queries to downstream services in order to minimize bytes over the wire and parse time. This can be enabled via the gateway config by setting `experimental_autoFragmentization: true`. It is currently disabled by default.
|
|
118
|
-
- Introduce `make-fetch-happen` package. Remove `cachedFetcher` in favor of the caching implementation provided by this package. [#3783](https://github.com/apollographql/apollo-server/pull/3783/files)
|
|
119
|
-
|
|
120
|
-
## v0.12.1
|
|
121
|
-
|
|
122
|
-
- Update to include [fixes from `@apollo/federation`](https://github.com/apollographql/apollo-server/blob/main/packages/apollo-federation/CHANGELOG.md).
|
|
123
|
-
|
|
124
|
-
## v0.12.0
|
|
125
|
-
|
|
126
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/9c0aa1e661ccc2c5a1471b781102637dd47e21b1)
|
|
127
|
-
|
|
128
|
-
- Reduce interface expansion for types contained to a single service [#3582](https://github.com/apollographql/apollo-server/pull/3582)
|
|
129
|
-
- Instantiate one `CachedFetcher` per gateway instance. This resolves a condition where multiple federated gateways would utilize the same cache store could result in an `Expected undefined to be a GraphQLSchema` error. [#3704](https://github.com/apollographql/apollo-server/pull/3704)
|
|
130
|
-
- Gateway: minimize downstream request size [#3737](https://github.com/apollographql/apollo-server/pull/3737)
|
|
131
|
-
- experimental: Allow configuration of the query plan store by introducing an `experimental_approximateQueryPlanStoreMiB` property to the `ApolloGateway` constructor options which overrides the default cache size of 30MiB. [#3755](https://github.com/apollographql/apollo-server/pull/3755)
|
|
132
|
-
|
|
133
|
-
## v0.11.6
|
|
134
|
-
|
|
135
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/0743d6b2f1737758cf09e80d2086917772bc00c9)
|
|
136
|
-
|
|
137
|
-
- Fix onSchemaChange callbacks for unmanaged configs [#3605](https://github.com/apollographql/apollo-server/pull/3605)
|
|
138
|
-
|
|
139
|
-
## v0.11.4
|
|
140
|
-
|
|
141
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/a0a60e73e04e913d388de8324f7d17e4406deea2)
|
|
142
|
-
|
|
143
|
-
* Gateway over-merging fields of unioned types [#3581](https://github.com/apollographql/apollo-server/pull/3581)
|
|
144
|
-
|
|
145
|
-
## v0.11.0
|
|
146
|
-
|
|
147
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/93002737d53dd9a50b473ab9cef14849b3e539aa)
|
|
148
|
-
|
|
149
|
-
- Begin supporting executable directives in federation [#3464](https://github.com/apollographql/apollo-server/pull/3464)
|
|
150
|
-
|
|
151
|
-
## v0.10.8
|
|
152
|
-
|
|
153
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/5d94e986f04457ec17114791ee6db3ece4213dd8)
|
|
154
|
-
|
|
155
|
-
- Fix Gateway / Playground Query Plan view [#3418](https://github.com/apollographql/apollo-server/pull/3418)
|
|
156
|
-
- Gateway schema change listener bug + refactor [#3411](https://github.com/apollographql/apollo-server/pull/3411) introduces a change to the `experimental_didUpdateComposition` hook and `experimental_pollInterval` configuration behavior.
|
|
157
|
-
1. Previously, the `experimental_didUpdateComposition` hook wouldn't be reliably called unless the `experimental_pollInterval` was set. If it _was_ called, it was sporadic and didn't necessarily mark the timing of an actual composition update. After this change, the hook is called on a successful composition update.
|
|
158
|
-
2. The `experimental_pollInterval` configuration option now affects both the GCS polling interval when gateway is configured for managed federation, as well as the polling interval of services. The former being newly introduced behavior.
|
|
159
|
-
- Gateway cached DataSource bug [#3412](https://github.com/apollographql/apollo-server/pull/3412) introduces a fix for managed federation users where `DataSource`s wouldn't update correctly if a service's url changed. This bug was introduced with heavier DataSource caching in [#3388](https://github.com/apollographql/apollo-server/pull/3388). By inspecting the `url` as well, `DataSource`s will now update correctly when a composition update occurs.
|
|
160
|
-
- Gateway - don't log updates on startup [#3421](https://github.com/apollographql/apollo-server/pull/3421) Fine tune gateway startup logging - on load, instead of logging an "update", log the service id, variant, and mode in which gateway is running.
|
|
161
|
-
|
|
162
|
-
## v0.10.7
|
|
163
|
-
|
|
164
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/fc7462ec5f8604bd6cba99aa9a377a9b8e045566)
|
|
165
|
-
|
|
166
|
-
- Add export for experimental observability functions types. [#3371](https://github.com/apollographql/apollo-server/pull/3371)
|
|
167
|
-
- Fix double instantiation of DataSources [#3388](https://github.com/apollographql/apollo-server/pull/3388)
|
|
168
|
-
|
|
169
|
-
## v0.10.6
|
|
170
|
-
|
|
171
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/aa200ce24b834320fc79d2605dac340b37d3e434)
|
|
172
|
-
|
|
173
|
-
- Fix debug query plan logging [#3376](https://github.com/apollographql/apollo-server/pull/3376)
|
|
174
|
-
- Add `context` object to `GraphQLDataSource.didReceiveResponse` arguments [#3360](https://github.com/apollographql/apollo-server/pull/3360)
|
|
175
|
-
|
|
176
|
-
## v0.10.1
|
|
177
|
-
|
|
178
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/029c8dca3af812ee70589cdb6de749df3d2843d8)
|
|
179
|
-
|
|
180
|
-
- Make service definition cache local to ApolloGateway object [#3191](https://github.com/apollographql/apollo-server/pull/3191)
|
|
181
|
-
- Fix value type behavior within composition and execution [#3182](https://github.com/apollographql/apollo-server/pull/3182)
|
|
182
|
-
- Validate variables at the gateway level [#3213](https://github.com/apollographql/apollo-server/pull/3213)
|
|
183
|
-
|
|
184
|
-
## v0.9.1
|
|
185
|
-
|
|
186
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/a1c41152a35c837af27d1dee081fc273de07a28e)
|
|
187
|
-
|
|
188
|
-
- Optimize buildQueryPlan when two FetchGroups are on the same service [#3135](https://github.com/apollographql/apollo-server/pull/3135)
|
|
189
|
-
- Construct and use RemoteGraphQLDataSource to issue introspection query to Federated Services [#3120](https://github.com/apollographql/apollo-server/pull/3120)
|
|
190
|
-
|
|
191
|
-
## v0.9.0
|
|
192
|
-
|
|
193
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/99f78c6782bce170186ba6ef311182a8c9f281b7)
|
|
194
|
-
|
|
195
|
-
- Add experimental observability functions [#3110](https://github.com/apollographql/apollo-server/pull/3110)
|
|
196
|
-
|
|
197
|
-
## v0.8.2
|
|
198
|
-
|
|
199
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/b0a9ce0615d19b7241e64883b5d5d7730cc13fcb)
|
|
200
|
-
|
|
201
|
-
- Handle `null` @requires selections correctly during execution [#3138](https://github.com/apollographql/apollo-server/pull/3138)
|
|
202
|
-
|
|
203
|
-
## v0.6.13
|
|
204
|
-
|
|
205
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/a06594117dbbf1e8abdb7b366b69a94ab808b065)
|
|
206
|
-
|
|
207
|
-
- Proxy errors from downstream services [#3019](https://github.com/apollographql/apollo-server/pull/3019)
|
|
208
|
-
- Handle schema defaultVariables correctly within downstream fetches [#2963](https://github.com/apollographql/apollo-server/pull/2963)
|
|
209
|
-
|
|
210
|
-
## v0.6.12
|
|
211
|
-
|
|
212
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/5974b2ce405a06bc331230400b9073f6381738d3)
|
|
213
|
-
|
|
214
|
-
- Fix `@requires` bug preventing array and null values. [PR #2928](https://github.com/apollographql/apollo-server/pull/2928)
|
|
215
|
-
|
|
216
|
-
## v0.6.5
|
|
217
|
-
|
|
218
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/9dcfe6f91fa7b4187a644efe1522cf444ffc1251)
|
|
219
|
-
|
|
220
|
-
- Relax constraints of root operation type names in validation [#2783](ttps://github.com/apollographql/apollo-server/pull/2783)
|
|
221
|
-
|
|
222
|
-
## v0.6.2
|
|
223
|
-
|
|
224
|
-
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/e113127b1ff9802de3bc5574bcae55256f0ef656)
|
|
225
|
-
|
|
226
|
-
- Resolve an issue with \__proto__ pollution in deepMerge() [#2779](https://github.com/apollographql/apollo-server/pull/2779)
|
package/LICENSE.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
The MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2019 Meteor Development Group, Inc.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
-
the Software without restriction, including without limitation the rights to
|
|
8
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
-
subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/dist/FieldSet.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FieldNode, GraphQLCompositeType, GraphQLField, SelectionSetNode, GraphQLObjectType } from 'graphql';
|
|
2
|
-
export interface Field<TParent extends GraphQLCompositeType = GraphQLCompositeType> {
|
|
3
|
-
scope: Scope<TParent>;
|
|
4
|
-
fieldNode: FieldNode;
|
|
5
|
-
fieldDef: GraphQLField<any, any>;
|
|
6
|
-
}
|
|
7
|
-
export interface Scope<TParent extends GraphQLCompositeType> {
|
|
8
|
-
parentType: TParent;
|
|
9
|
-
possibleTypes: ReadonlyArray<GraphQLObjectType>;
|
|
10
|
-
enclosingScope?: Scope<GraphQLCompositeType>;
|
|
11
|
-
}
|
|
12
|
-
export declare type FieldSet = Field[];
|
|
13
|
-
export declare function printFields(fields?: FieldSet): string;
|
|
14
|
-
export declare function matchesField(field: Field): (otherField: Field) => boolean;
|
|
15
|
-
export declare const groupByResponseName: (iterable: Iterable<Field<GraphQLCompositeType>>) => Map<string, Field<GraphQLCompositeType>[]>;
|
|
16
|
-
export declare const groupByParentType: (iterable: Iterable<Field<GraphQLCompositeType>>) => Map<GraphQLCompositeType, Field<GraphQLCompositeType>[]>;
|
|
17
|
-
export declare function selectionSetFromFieldSet(fields: FieldSet, parentType?: GraphQLCompositeType): SelectionSetNode;
|
|
18
|
-
//# sourceMappingURL=FieldSet.d.ts.map
|
package/dist/FieldSet.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FieldSet.d.ts","sourceRoot":"","sources":["../src/FieldSet.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,oBAAoB,EACpB,YAAY,EAIZ,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAIjB,MAAM,WAAW,KAAK,CACpB,OAAO,SAAS,oBAAoB,GAAG,oBAAoB;IAE3D,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,KAAK,CAAC,OAAO,SAAS,oBAAoB;IACzD,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAChD,cAAc,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;CAC9C;AAED,oBAAY,QAAQ,GAAG,KAAK,EAAE,CAAC;AAE/B,wBAAgB,WAAW,CAAC,MAAM,CAAC,EAAE,QAAQ,UAS5C;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,gBAEnB,KAAK,aAG1B;AAED,eAAO,MAAM,mBAAmB,iGAE/B,CAAC;AAEF,eAAO,MAAM,iBAAiB,+GAE7B,CAAC;AAEF,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,QAAQ,EAChB,UAAU,CAAC,EAAE,oBAAoB,GAChC,gBAAgB,CAiBlB"}
|
package/dist/FieldSet.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.selectionSetFromFieldSet = exports.groupByParentType = exports.groupByResponseName = exports.matchesField = exports.printFields = void 0;
|
|
4
|
-
const graphql_1 = require("graphql");
|
|
5
|
-
const graphql_2 = require("./utilities/graphql");
|
|
6
|
-
const array_1 = require("./utilities/array");
|
|
7
|
-
function printFields(fields) {
|
|
8
|
-
if (!fields)
|
|
9
|
-
return '[]';
|
|
10
|
-
return ('[' +
|
|
11
|
-
fields
|
|
12
|
-
.map(field => `"${field.scope.parentType.name}.${field.fieldDef.name}"`)
|
|
13
|
-
.join(', ') +
|
|
14
|
-
']');
|
|
15
|
-
}
|
|
16
|
-
exports.printFields = printFields;
|
|
17
|
-
function matchesField(field) {
|
|
18
|
-
return (otherField) => {
|
|
19
|
-
return field.fieldDef.name === otherField.fieldDef.name;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
exports.matchesField = matchesField;
|
|
23
|
-
exports.groupByResponseName = array_1.groupBy(field => graphql_2.getResponseName(field.fieldNode));
|
|
24
|
-
exports.groupByParentType = array_1.groupBy(field => field.scope.parentType);
|
|
25
|
-
function selectionSetFromFieldSet(fields, parentType) {
|
|
26
|
-
return {
|
|
27
|
-
kind: graphql_1.Kind.SELECTION_SET,
|
|
28
|
-
selections: Array.from(exports.groupByParentType(fields)).flatMap(([typeCondition, fieldsByParentType]) => wrapInInlineFragmentIfNeeded(Array.from(exports.groupByResponseName(fieldsByParentType).values()).map(fieldsByResponseName => {
|
|
29
|
-
return combineFields(fieldsByResponseName)
|
|
30
|
-
.fieldNode;
|
|
31
|
-
}), typeCondition, parentType)),
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
exports.selectionSetFromFieldSet = selectionSetFromFieldSet;
|
|
35
|
-
function wrapInInlineFragmentIfNeeded(selections, typeCondition, parentType) {
|
|
36
|
-
return typeCondition === parentType
|
|
37
|
-
? selections
|
|
38
|
-
: [
|
|
39
|
-
{
|
|
40
|
-
kind: graphql_1.Kind.INLINE_FRAGMENT,
|
|
41
|
-
typeCondition: {
|
|
42
|
-
kind: graphql_1.Kind.NAMED_TYPE,
|
|
43
|
-
name: {
|
|
44
|
-
kind: graphql_1.Kind.NAME,
|
|
45
|
-
value: typeCondition.name,
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
selectionSet: { kind: graphql_1.Kind.SELECTION_SET, selections },
|
|
49
|
-
},
|
|
50
|
-
];
|
|
51
|
-
}
|
|
52
|
-
function combineFields(fields) {
|
|
53
|
-
const { scope, fieldNode, fieldDef } = fields[0];
|
|
54
|
-
const returnType = graphql_1.getNamedType(fieldDef.type);
|
|
55
|
-
if (graphql_1.isCompositeType(returnType)) {
|
|
56
|
-
return {
|
|
57
|
-
scope,
|
|
58
|
-
fieldNode: {
|
|
59
|
-
...fieldNode,
|
|
60
|
-
selectionSet: mergeSelectionSets(fields.map(field => field.fieldNode)),
|
|
61
|
-
},
|
|
62
|
-
fieldDef,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
return { scope, fieldNode, fieldDef };
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
function mergeSelectionSets(fieldNodes) {
|
|
70
|
-
const selections = [];
|
|
71
|
-
for (const fieldNode of fieldNodes) {
|
|
72
|
-
if (!fieldNode.selectionSet)
|
|
73
|
-
continue;
|
|
74
|
-
selections.push(...fieldNode.selectionSet.selections);
|
|
75
|
-
}
|
|
76
|
-
return {
|
|
77
|
-
kind: 'SelectionSet',
|
|
78
|
-
selections: mergeFieldNodeSelectionSets(selections),
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function mergeFieldNodeSelectionSets(selectionNodes) {
|
|
82
|
-
const [fieldNodes, fragmentNodes] = array_1.partition(selectionNodes, (node) => node.kind === graphql_1.Kind.FIELD);
|
|
83
|
-
const [aliasedFieldNodes, nonAliasedFieldNodes] = array_1.partition(fieldNodes, node => !!node.alias);
|
|
84
|
-
const mergedFieldNodes = Array.from(array_1.groupBy((node) => node.name.value)(nonAliasedFieldNodes).values()).map((nodesWithSameName) => {
|
|
85
|
-
const node = { ...nodesWithSameName[0] };
|
|
86
|
-
if (node.selectionSet) {
|
|
87
|
-
node.selectionSet = {
|
|
88
|
-
...node.selectionSet,
|
|
89
|
-
selections: mergeFieldNodeSelectionSets(nodesWithSameName.flatMap((node) => { var _a; return ((_a = node.selectionSet) === null || _a === void 0 ? void 0 : _a.selections) || []; })),
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
return node;
|
|
93
|
-
});
|
|
94
|
-
return [...mergedFieldNodes, ...aliasedFieldNodes, ...fragmentNodes];
|
|
95
|
-
}
|
|
96
|
-
//# sourceMappingURL=FieldSet.js.map
|
package/dist/FieldSet.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FieldSet.js","sourceRoot":"","sources":["../src/FieldSet.ts"],"names":[],"mappings":";;;AAAA,qCAUiB;AACjB,iDAAsD;AACtD,6CAAuD;AAkBvD,SAAgB,WAAW,CAAC,MAAiB;IAC3C,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACzB,OAAO,CACL,GAAG;QACH,MAAM;aACH,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC;aACvE,IAAI,CAAC,IAAI,CAAC;QACb,GAAG,CACJ,CAAC;AACJ,CAAC;AATD,kCASC;AAED,SAAgB,YAAY,CAAC,KAAY;IAEvC,OAAO,CAAC,UAAiB,EAAE,EAAE;QAC3B,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,KAAK,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC;AALD,oCAKC;AAEY,QAAA,mBAAmB,GAAG,eAAO,CAAgB,K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AK,CAAC,CAC3C,oBAAoB,CACrB,CAAC,MAAM,EAAE,CACX,CAAC,GAAG,CAAC,CAAC,iBAAiB,EAAE,EAAE;QAC1B,MAAM,IAAI,GAAG,EAAE,GAAG,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,IAAI,CAAC,YAAY,GAAG;gBAClB,GAAG,IAAI,CAAC,YAAY;gBACpB,UAAU,EAAE,2BAA2B,CACrC,iBAAiB,CAAC,OAAO,CACvB,CAAC,IAAI,EAAE,EAAE,WAAC,OAAA,OAAA,IAAI,CAAC,YAAY,0CAAE,UAAU,KAAI,EAAE,CAAA,EAAA,CAC9C,CACF;aACF,CAAC;SACH;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,gBAAgB,EAAE,GAAG,iBAAiB,EAAE,GAAG,aAAa,CAAC,CAAC;AACvE,CAAC"}
|
package/dist/QueryPlan.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { FragmentDefinitionNode, GraphQLSchema, OperationDefinitionNode, SelectionSetNode, VariableDefinitionNode } from 'graphql';
|
|
2
|
-
export declare type ResponsePath = (string | number)[];
|
|
3
|
-
export declare type FragmentMap = {
|
|
4
|
-
[fragmentName: string]: FragmentDefinitionNode;
|
|
5
|
-
};
|
|
6
|
-
export interface QueryPlan {
|
|
7
|
-
kind: 'QueryPlan';
|
|
8
|
-
node?: PlanNode;
|
|
9
|
-
}
|
|
10
|
-
export declare type OperationContext = {
|
|
11
|
-
schema: GraphQLSchema;
|
|
12
|
-
operation: OperationDefinitionNode;
|
|
13
|
-
fragments: FragmentMap;
|
|
14
|
-
};
|
|
15
|
-
export declare type PlanNode = SequenceNode | ParallelNode | FetchNode | FlattenNode;
|
|
16
|
-
export interface SequenceNode {
|
|
17
|
-
kind: 'Sequence';
|
|
18
|
-
nodes: PlanNode[];
|
|
19
|
-
}
|
|
20
|
-
export interface ParallelNode {
|
|
21
|
-
kind: 'Parallel';
|
|
22
|
-
nodes: PlanNode[];
|
|
23
|
-
}
|
|
24
|
-
export interface FetchNode {
|
|
25
|
-
kind: 'Fetch';
|
|
26
|
-
serviceName: string;
|
|
27
|
-
selectionSet: SelectionSetNode;
|
|
28
|
-
variableUsages?: {
|
|
29
|
-
[name: string]: VariableDefinitionNode;
|
|
30
|
-
};
|
|
31
|
-
requires?: SelectionSetNode;
|
|
32
|
-
internalFragments: Set<FragmentDefinitionNode>;
|
|
33
|
-
source: string;
|
|
34
|
-
}
|
|
35
|
-
export interface FlattenNode {
|
|
36
|
-
kind: 'Flatten';
|
|
37
|
-
path: ResponsePath;
|
|
38
|
-
node: PlanNode;
|
|
39
|
-
}
|
|
40
|
-
export declare function serializeQueryPlan(queryPlan: QueryPlan): string;
|
|
41
|
-
//# sourceMappingURL=QueryPlan.d.ts.map
|
package/dist/QueryPlan.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryPlan.d.ts","sourceRoot":"","sources":["../src/QueryPlan.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,uBAAuB,EACvB,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,SAAS,CAAC;AAIjB,oBAAY,YAAY,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AAE/C,oBAAY,WAAW,GAAG;IAAE,CAAC,YAAY,EAAE,MAAM,GAAG,sBAAsB,CAAA;CAAE,CAAC;AAE7E,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,oBAAY,gBAAgB,GAAG;IAC7B,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,EAAE,uBAAuB,CAAC;IACnC,SAAS,EAAE,WAAW,CAAC;CACxB,CAAC;AAEF,oBAAY,QAAQ,GAAG,YAAY,GAAG,YAAY,GAAG,SAAS,GAAG,WAAW,CAAC;AAE7E,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,cAAc,CAAC,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB,CAAA;KAAE,CAAC;IAC5D,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,iBAAiB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC;IAC/C,MAAM,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,SAAS,UAItD"}
|
package/dist/QueryPlan.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.serializeQueryPlan = void 0;
|
|
7
|
-
const snapshotSerializers_1 = require("./snapshotSerializers");
|
|
8
|
-
const pretty_format_1 = __importDefault(require("pretty-format"));
|
|
9
|
-
function serializeQueryPlan(queryPlan) {
|
|
10
|
-
return pretty_format_1.default(queryPlan, {
|
|
11
|
-
plugins: [snapshotSerializers_1.queryPlanSerializer, snapshotSerializers_1.astSerializer],
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
exports.serializeQueryPlan = serializeQueryPlan;
|
|
15
|
-
//# sourceMappingURL=QueryPlan.js.map
|
package/dist/QueryPlan.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryPlan.js","sourceRoot":"","sources":["../src/QueryPlan.ts"],"names":[],"mappings":";;;;;;AAOA,+DAA2E;AAC3E,kEAAyC;AA4CzC,SAAgB,kBAAkB,CAAC,SAAoB;IACrD,OAAO,uBAAY,CAAC,SAAS,EAAE;QAC7B,OAAO,EAAE,CAAC,yCAAmB,EAAE,mCAAa,CAAC;KAC9C,CAAC,CAAC;AACL,CAAC;AAJD,gDAIC"}
|
package/dist/buildQueryPlan.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { DocumentNode, FieldNode, FragmentDefinitionNode, GraphQLAbstractType, GraphQLCompositeType, GraphQLField, GraphQLObjectType, GraphQLSchema, OperationDefinitionNode, SelectionSetNode, VariableDefinitionNode } from 'graphql';
|
|
2
|
-
import { FieldSet, Scope } from './FieldSet';
|
|
3
|
-
import { QueryPlan, OperationContext, FragmentMap } from './QueryPlan';
|
|
4
|
-
export interface BuildQueryPlanOptions {
|
|
5
|
-
autoFragmentization: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare function buildQueryPlan(operationContext: OperationContext, options?: BuildQueryPlanOptions): QueryPlan;
|
|
8
|
-
export declare function collectSubfields(context: QueryPlanningContext, returnType: GraphQLCompositeType, fields: FieldSet): FieldSet;
|
|
9
|
-
export declare function buildOperationContext(schema: GraphQLSchema, document: DocumentNode, operationName?: string): OperationContext;
|
|
10
|
-
export declare function buildQueryPlanningContext({ operation, schema, fragments }: OperationContext, options: BuildQueryPlanOptions): QueryPlanningContext;
|
|
11
|
-
export declare class QueryPlanningContext {
|
|
12
|
-
readonly schema: GraphQLSchema;
|
|
13
|
-
readonly operation: OperationDefinitionNode;
|
|
14
|
-
readonly fragments: FragmentMap;
|
|
15
|
-
readonly autoFragmentization: boolean;
|
|
16
|
-
internalFragments: Map<string, {
|
|
17
|
-
name: string;
|
|
18
|
-
definition: FragmentDefinitionNode;
|
|
19
|
-
selectionSet: SelectionSetNode;
|
|
20
|
-
}>;
|
|
21
|
-
internalFragmentCount: number;
|
|
22
|
-
protected variableDefinitions: {
|
|
23
|
-
[name: string]: VariableDefinitionNode;
|
|
24
|
-
};
|
|
25
|
-
constructor(schema: GraphQLSchema, operation: OperationDefinitionNode, fragments: FragmentMap, autoFragmentization: boolean);
|
|
26
|
-
getFieldDef(parentType: GraphQLCompositeType, fieldNode: FieldNode): GraphQLField<any, any, {
|
|
27
|
-
[key: string]: any;
|
|
28
|
-
}>;
|
|
29
|
-
getPossibleTypes(type: GraphQLAbstractType | GraphQLObjectType): ReadonlyArray<GraphQLObjectType>;
|
|
30
|
-
getVariableUsages(selectionSet: SelectionSetNode, fragments: Set<FragmentDefinitionNode>): {
|
|
31
|
-
[name: string]: VariableDefinitionNode;
|
|
32
|
-
};
|
|
33
|
-
newScope<TParent extends GraphQLCompositeType>(parentType: TParent, enclosingScope?: Scope<GraphQLCompositeType>): Scope<TParent>;
|
|
34
|
-
getBaseService(parentType: GraphQLObjectType): string | null;
|
|
35
|
-
getOwningService(parentType: GraphQLObjectType, fieldDef: GraphQLField<any, any>): string | null;
|
|
36
|
-
getKeyFields({ parentType, serviceName, fetchAll, }: {
|
|
37
|
-
parentType: GraphQLCompositeType;
|
|
38
|
-
serviceName: string;
|
|
39
|
-
fetchAll?: boolean;
|
|
40
|
-
}): FieldSet;
|
|
41
|
-
getRequiredFields(parentType: GraphQLCompositeType, fieldDef: GraphQLField<any, any>, serviceName: string): FieldSet;
|
|
42
|
-
getProvidedFields(fieldDef: GraphQLField<any, any>, serviceName: string): FieldSet;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=buildQueryPlan.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buildQueryPlan.d.ts","sourceRoot":"","sources":["../src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