@apollo/gateway 0.300.0-alpha.3 → 2.0.0-alpha.3

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.
Files changed (199) hide show
  1. package/LICENSE +95 -0
  2. package/README.md +1 -1
  3. package/dist/__generated__/graphqlTypes.d.ts +130 -0
  4. package/dist/__generated__/graphqlTypes.d.ts.map +1 -0
  5. package/dist/__generated__/graphqlTypes.js +25 -0
  6. package/dist/__generated__/graphqlTypes.js.map +1 -0
  7. package/dist/config.d.ts +106 -0
  8. package/dist/config.d.ts.map +1 -0
  9. package/dist/config.js +47 -0
  10. package/dist/config.js.map +1 -0
  11. package/dist/datasources/LocalGraphQLDataSource.d.ts +3 -3
  12. package/dist/datasources/LocalGraphQLDataSource.d.ts.map +1 -1
  13. package/dist/datasources/LocalGraphQLDataSource.js +5 -5
  14. package/dist/datasources/LocalGraphQLDataSource.js.map +1 -1
  15. package/dist/datasources/RemoteGraphQLDataSource.d.ts +6 -4
  16. package/dist/datasources/RemoteGraphQLDataSource.d.ts.map +1 -1
  17. package/dist/datasources/RemoteGraphQLDataSource.js +64 -18
  18. package/dist/datasources/RemoteGraphQLDataSource.js.map +1 -1
  19. package/dist/datasources/index.d.ts +1 -1
  20. package/dist/datasources/index.d.ts.map +1 -1
  21. package/dist/datasources/index.js +1 -0
  22. package/dist/datasources/index.js.map +1 -1
  23. package/dist/datasources/parseCacheControlHeader.d.ts +2 -0
  24. package/dist/datasources/parseCacheControlHeader.d.ts.map +1 -0
  25. package/dist/datasources/parseCacheControlHeader.js +16 -0
  26. package/dist/datasources/parseCacheControlHeader.js.map +1 -0
  27. package/dist/datasources/types.d.ts +16 -1
  28. package/dist/datasources/types.d.ts.map +1 -1
  29. package/dist/datasources/types.js +7 -0
  30. package/dist/datasources/types.js.map +1 -1
  31. package/dist/executeQueryPlan.d.ts +2 -1
  32. package/dist/executeQueryPlan.d.ts.map +1 -1
  33. package/dist/executeQueryPlan.js +200 -113
  34. package/dist/executeQueryPlan.js.map +1 -1
  35. package/dist/index.d.ts +64 -80
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +554 -233
  38. package/dist/index.js.map +1 -1
  39. package/dist/loadServicesFromRemoteEndpoint.d.ts +9 -9
  40. package/dist/loadServicesFromRemoteEndpoint.d.ts.map +1 -1
  41. package/dist/loadServicesFromRemoteEndpoint.js +13 -8
  42. package/dist/loadServicesFromRemoteEndpoint.js.map +1 -1
  43. package/dist/loadSupergraphSdlFromStorage.d.ts +21 -0
  44. package/dist/loadSupergraphSdlFromStorage.d.ts.map +1 -0
  45. package/dist/loadSupergraphSdlFromStorage.js +128 -0
  46. package/dist/loadSupergraphSdlFromStorage.js.map +1 -0
  47. package/dist/operationContext.d.ts +17 -0
  48. package/dist/operationContext.d.ts.map +1 -0
  49. package/dist/operationContext.js +42 -0
  50. package/dist/operationContext.js.map +1 -0
  51. package/dist/outOfBandReporter.d.ts +13 -0
  52. package/dist/outOfBandReporter.d.ts.map +1 -0
  53. package/dist/outOfBandReporter.js +85 -0
  54. package/dist/outOfBandReporter.js.map +1 -0
  55. package/dist/utilities/array.d.ts +1 -2
  56. package/dist/utilities/array.d.ts.map +1 -1
  57. package/dist/utilities/array.js +7 -14
  58. package/dist/utilities/array.js.map +1 -1
  59. package/dist/utilities/assert.d.ts +2 -0
  60. package/dist/utilities/assert.d.ts.map +1 -0
  61. package/dist/utilities/assert.js +10 -0
  62. package/dist/utilities/assert.js.map +1 -0
  63. package/dist/utilities/cleanErrorOfInaccessibleNames.d.ts +3 -0
  64. package/dist/utilities/cleanErrorOfInaccessibleNames.d.ts.map +1 -0
  65. package/dist/utilities/cleanErrorOfInaccessibleNames.js +27 -0
  66. package/dist/utilities/cleanErrorOfInaccessibleNames.js.map +1 -0
  67. package/dist/utilities/deepMerge.js +2 -2
  68. package/dist/utilities/deepMerge.js.map +1 -1
  69. package/dist/utilities/graphql.d.ts +1 -4
  70. package/dist/utilities/graphql.d.ts.map +1 -1
  71. package/dist/utilities/graphql.js +3 -36
  72. package/dist/utilities/graphql.js.map +1 -1
  73. package/dist/utilities/opentelemetry.d.ts +10 -0
  74. package/dist/utilities/opentelemetry.d.ts.map +1 -0
  75. package/dist/utilities/opentelemetry.js +19 -0
  76. package/dist/utilities/opentelemetry.js.map +1 -0
  77. package/package.json +32 -23
  78. package/src/__generated__/graphqlTypes.ts +140 -0
  79. package/src/__mocks__/apollo-server-env.ts +56 -0
  80. package/src/__mocks__/make-fetch-happen-fetcher.ts +57 -0
  81. package/src/__mocks__/tsconfig.json +7 -0
  82. package/src/__tests__/build-query-plan.feature +40 -311
  83. package/src/__tests__/buildQueryPlan.test.ts +246 -426
  84. package/src/__tests__/executeQueryPlan.test.ts +2289 -194
  85. package/src/__tests__/execution-utils.ts +33 -26
  86. package/src/__tests__/gateway/__snapshots__/opentelemetry.test.ts.snap +195 -0
  87. package/src/__tests__/gateway/buildService.test.ts +16 -19
  88. package/src/__tests__/gateway/composedSdl.test.ts +44 -0
  89. package/src/__tests__/gateway/endToEnd.test.ts +166 -0
  90. package/src/__tests__/gateway/executor.test.ts +49 -43
  91. package/src/__tests__/gateway/lifecycle-hooks.test.ts +58 -29
  92. package/src/__tests__/gateway/opentelemetry.test.ts +123 -0
  93. package/src/__tests__/gateway/queryPlanCache.test.ts +19 -20
  94. package/src/__tests__/gateway/reporting.test.ts +83 -59
  95. package/src/__tests__/integration/abstract-types.test.ts +1086 -22
  96. package/src/__tests__/integration/aliases.test.ts +5 -6
  97. package/src/__tests__/integration/boolean.test.ts +40 -38
  98. package/src/__tests__/integration/complex-key.test.ts +41 -56
  99. package/src/__tests__/integration/configuration.test.ts +361 -0
  100. package/src/__tests__/integration/custom-directives.test.ts +61 -46
  101. package/src/__tests__/integration/fragments.test.ts +8 -2
  102. package/src/__tests__/integration/list-key.test.ts +2 -2
  103. package/src/__tests__/integration/logger.test.ts +2 -2
  104. package/src/__tests__/integration/multiple-key.test.ts +11 -12
  105. package/src/__tests__/integration/mutations.test.ts +8 -5
  106. package/src/__tests__/integration/networkRequests.test.ts +454 -294
  107. package/src/__tests__/integration/nockMocks.ts +100 -65
  108. package/src/__tests__/integration/provides.test.ts +9 -6
  109. package/src/__tests__/integration/requires.test.ts +17 -15
  110. package/src/__tests__/integration/scope.test.ts +557 -0
  111. package/src/__tests__/integration/unions.test.ts +1 -1
  112. package/src/__tests__/integration/value-types.test.ts +35 -32
  113. package/src/__tests__/integration/variables.test.ts +8 -2
  114. package/src/__tests__/loadServicesFromRemoteEndpoint.test.ts +6 -2
  115. package/src/__tests__/loadSupergraphSdlFromStorage.test.ts +343 -0
  116. package/src/__tests__/nockAssertions.ts +20 -0
  117. package/src/__tests__/queryPlanCucumber.test.ts +11 -61
  118. package/src/__tests__/testSetup.ts +1 -4
  119. package/src/__tests__/tsconfig.json +2 -1
  120. package/src/config.ts +227 -0
  121. package/src/core/__tests__/core.test.ts +412 -0
  122. package/src/datasources/LocalGraphQLDataSource.ts +9 -10
  123. package/src/datasources/RemoteGraphQLDataSource.ts +125 -45
  124. package/src/datasources/__tests__/LocalGraphQLDataSource.test.ts +11 -4
  125. package/src/datasources/__tests__/RemoteGraphQLDataSource.test.ts +148 -79
  126. package/src/datasources/__tests__/tsconfig.json +4 -2
  127. package/src/datasources/index.ts +1 -1
  128. package/src/datasources/parseCacheControlHeader.ts +43 -0
  129. package/src/datasources/types.ts +47 -2
  130. package/src/executeQueryPlan.ts +275 -154
  131. package/src/index.ts +939 -480
  132. package/src/loadServicesFromRemoteEndpoint.ts +24 -17
  133. package/src/loadSupergraphSdlFromStorage.ts +186 -0
  134. package/src/make-fetch-happen.d.ts +2 -2
  135. package/src/operationContext.ts +70 -0
  136. package/src/outOfBandReporter.ts +126 -0
  137. package/src/utilities/__tests__/cleanErrorOfInaccessibleElements.test.ts +104 -0
  138. package/src/utilities/__tests__/tsconfig.json +8 -0
  139. package/src/utilities/array.ts +6 -28
  140. package/src/utilities/assert.ts +14 -0
  141. package/src/utilities/cleanErrorOfInaccessibleNames.ts +29 -0
  142. package/src/utilities/graphql.ts +0 -64
  143. package/src/utilities/opentelemetry.ts +13 -0
  144. package/CHANGELOG.md +0 -226
  145. package/LICENSE.md +0 -20
  146. package/dist/FieldSet.d.ts +0 -18
  147. package/dist/FieldSet.d.ts.map +0 -1
  148. package/dist/FieldSet.js +0 -96
  149. package/dist/FieldSet.js.map +0 -1
  150. package/dist/QueryPlan.d.ts +0 -41
  151. package/dist/QueryPlan.d.ts.map +0 -1
  152. package/dist/QueryPlan.js +0 -15
  153. package/dist/QueryPlan.js.map +0 -1
  154. package/dist/buildQueryPlan.d.ts +0 -44
  155. package/dist/buildQueryPlan.d.ts.map +0 -1
  156. package/dist/buildQueryPlan.js +0 -670
  157. package/dist/buildQueryPlan.js.map +0 -1
  158. package/dist/loadServicesFromStorage.d.ts +0 -21
  159. package/dist/loadServicesFromStorage.d.ts.map +0 -1
  160. package/dist/loadServicesFromStorage.js +0 -64
  161. package/dist/loadServicesFromStorage.js.map +0 -1
  162. package/dist/snapshotSerializers/astSerializer.d.ts +0 -3
  163. package/dist/snapshotSerializers/astSerializer.d.ts.map +0 -1
  164. package/dist/snapshotSerializers/astSerializer.js +0 -14
  165. package/dist/snapshotSerializers/astSerializer.js.map +0 -1
  166. package/dist/snapshotSerializers/index.d.ts +0 -13
  167. package/dist/snapshotSerializers/index.d.ts.map +0 -1
  168. package/dist/snapshotSerializers/index.js +0 -15
  169. package/dist/snapshotSerializers/index.js.map +0 -1
  170. package/dist/snapshotSerializers/queryPlanSerializer.d.ts +0 -3
  171. package/dist/snapshotSerializers/queryPlanSerializer.d.ts.map +0 -1
  172. package/dist/snapshotSerializers/queryPlanSerializer.js +0 -78
  173. package/dist/snapshotSerializers/queryPlanSerializer.js.map +0 -1
  174. package/dist/snapshotSerializers/selectionSetSerializer.d.ts +0 -3
  175. package/dist/snapshotSerializers/selectionSetSerializer.d.ts.map +0 -1
  176. package/dist/snapshotSerializers/selectionSetSerializer.js +0 -12
  177. package/dist/snapshotSerializers/selectionSetSerializer.js.map +0 -1
  178. package/dist/snapshotSerializers/typeSerializer.d.ts +0 -3
  179. package/dist/snapshotSerializers/typeSerializer.d.ts.map +0 -1
  180. package/dist/snapshotSerializers/typeSerializer.js +0 -12
  181. package/dist/snapshotSerializers/typeSerializer.js.map +0 -1
  182. package/dist/utilities/MultiMap.d.ts +0 -4
  183. package/dist/utilities/MultiMap.d.ts.map +0 -1
  184. package/dist/utilities/MultiMap.js +0 -17
  185. package/dist/utilities/MultiMap.js.map +0 -1
  186. package/src/FieldSet.ts +0 -169
  187. package/src/QueryPlan.ts +0 -57
  188. package/src/__tests__/matchers/toCallService.ts +0 -105
  189. package/src/__tests__/matchers/toHaveBeenCalledBefore.ts +0 -40
  190. package/src/__tests__/matchers/toHaveFetched.ts +0 -81
  191. package/src/__tests__/matchers/toMatchAST.ts +0 -64
  192. package/src/buildQueryPlan.ts +0 -1190
  193. package/src/loadServicesFromStorage.ts +0 -170
  194. package/src/snapshotSerializers/astSerializer.ts +0 -21
  195. package/src/snapshotSerializers/index.ts +0 -21
  196. package/src/snapshotSerializers/queryPlanSerializer.ts +0 -144
  197. package/src/snapshotSerializers/selectionSetSerializer.ts +0 -13
  198. package/src/snapshotSerializers/typeSerializer.ts +0 -11
  199. package/src/utilities/MultiMap.ts +0 -11
package/LICENSE ADDED
@@ -0,0 +1,95 @@
1
+ Copyright 2021 Apollo Graph, Inc.
2
+
3
+ Elastic License 2.0
4
+
5
+ ## Acceptance
6
+
7
+ By using the software, you agree to all of the terms and conditions below.
8
+
9
+ ## Copyright License
10
+
11
+ The licensor grants you a non-exclusive, royalty-free, worldwide,
12
+ non-sublicensable, non-transferable license to use, copy, distribute, make
13
+ available, and prepare derivative works of the software, in each case subject to
14
+ the limitations and conditions below.
15
+
16
+ ## Limitations
17
+
18
+ You may not provide the software to third parties as a hosted or managed
19
+ service, where the service provides users with access to any substantial set of
20
+ the features or functionality of the software.
21
+
22
+ You may not move, change, disable, or circumvent the license key functionality
23
+ in the software, and you may not remove or obscure any functionality in the
24
+ software that is protected by the license key.
25
+
26
+ You may not alter, remove, or obscure any licensing, copyright, or other notices
27
+ of the licensor in the software. Any use of the licensor’s trademarks is subject
28
+ to applicable law.
29
+
30
+ ## Patents
31
+
32
+ The licensor grants you a license, under any patent claims the licensor can
33
+ license, or becomes able to license, to make, have made, use, sell, offer for
34
+ sale, import and have imported the software, in each case subject to the
35
+ limitations and conditions in this license. This license does not cover any
36
+ patent claims that you cause to be infringed by modifications or additions to
37
+ the software. If you or your company make any written claim that the software
38
+ infringes or contributes to infringement of any patent, your patent license for
39
+ the software granted under these terms ends immediately. If your company makes
40
+ such a claim, your patent license ends immediately for work on behalf of your
41
+ company.
42
+
43
+ ## Notices
44
+
45
+ You must ensure that anyone who gets a copy of any part of the software from you
46
+ also gets a copy of these terms.
47
+
48
+ If you modify the software, you must include in any modified copies of the
49
+ software prominent notices stating that you have modified the software.
50
+
51
+ ## No Other Rights
52
+
53
+ These terms do not imply any licenses other than those expressly granted in
54
+ these terms.
55
+
56
+ ## Termination
57
+
58
+ If you use the software in violation of these terms, such use is not licensed,
59
+ and your licenses will automatically terminate. If the licensor provides you
60
+ with a notice of your violation, and you cease all violation of this license no
61
+ later than 30 days after you receive that notice, your licenses will be
62
+ reinstated retroactively. However, if you violate these terms after such
63
+ reinstatement, any additional violation of these terms will cause your licenses
64
+ to terminate automatically and permanently.
65
+
66
+ ## No Liability
67
+
68
+ *As far as the law allows, the software comes as is, without any warranty or
69
+ condition, and the licensor will not be liable to you for any damages arising
70
+ out of these terms or the use or nature of the software, under any kind of
71
+ legal claim.*
72
+
73
+ ## Definitions
74
+
75
+ The **licensor** is the entity offering these terms, and the **software** is the
76
+ software the licensor makes available under these terms, including any portion
77
+ of it.
78
+
79
+ **you** refers to the individual or entity agreeing to these terms.
80
+
81
+ **your company** is any legal entity, sole proprietorship, or other kind of
82
+ organization that you work for, plus all organizations that have control over,
83
+ are under the control of, or are under common control with that
84
+ organization. **control** means ownership of substantially all the assets of an
85
+ entity, or the power to direct its management and policies by vote, contract, or
86
+ otherwise. Control can be direct or indirect.
87
+
88
+ **your licenses** are all the licenses granted to you for the software under
89
+ these terms.
90
+
91
+ **use** means anything you do with the software requiring one of your licenses.
92
+
93
+ **trademark** means trademarks, service marks, and similar rights.
94
+
95
+ --------------------------------------------------------------------------------
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  This package provides utilities for combining multiple GraphQL microservices into a single GraphQL endpoint.
4
4
 
5
- Each microservice should implement the [federation schema specification](https://www.apollographql.com/docs/apollo-server/federation/federation-spec/). This can be done either through [Apollo Federation](https://github.com/apollographql/apollo-server/tree/main/packages/apollo-federation) or a variety of other open source products.
5
+ Each microservice should implement the [federation schema specification](https://www.apollographql.com/docs/apollo-server/federation/federation-spec/). This can be done either through [Apollo Federation](https://github.com/apollographql/federation/tree/HEAD/subgraph-js) or a variety of other open source products.
6
6
 
7
7
  For complete documentation, see the [Apollo Gateway API reference](https://www.apollographql.com/docs/apollo-server/api/apollo-gateway/).
8
8
 
@@ -0,0 +1,130 @@
1
+ export declare type Maybe<T> = T | null;
2
+ export declare type InputMaybe<T> = Maybe<T>;
3
+ export declare type Exact<T extends {
4
+ [key: string]: unknown;
5
+ }> = {
6
+ [K in keyof T]: T[K];
7
+ };
8
+ export declare type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
9
+ [SubKey in K]?: Maybe<T[SubKey]>;
10
+ };
11
+ export declare type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
12
+ [SubKey in K]: Maybe<T[SubKey]>;
13
+ };
14
+ export declare type Scalars = {
15
+ ID: string;
16
+ String: string;
17
+ Boolean: boolean;
18
+ Int: number;
19
+ Float: number;
20
+ Timestamp: any;
21
+ };
22
+ export declare type ApiMonitoringReport = {
23
+ endedAt: Scalars['Timestamp'];
24
+ error: Error;
25
+ request: Request;
26
+ response?: InputMaybe<Response>;
27
+ startedAt: Scalars['Timestamp'];
28
+ tags?: InputMaybe<Array<Scalars['String']>>;
29
+ };
30
+ export declare type Error = {
31
+ code: ErrorCode;
32
+ message?: InputMaybe<Scalars['String']>;
33
+ };
34
+ export declare enum ErrorCode {
35
+ ConnectionFailed = "CONNECTION_FAILED",
36
+ InvalidBody = "INVALID_BODY",
37
+ Other = "OTHER",
38
+ Timeout = "TIMEOUT",
39
+ UnexpectedResponse = "UNEXPECTED_RESPONSE"
40
+ }
41
+ export declare type FetchError = {
42
+ __typename?: 'FetchError';
43
+ code: FetchErrorCode;
44
+ message: Scalars['String'];
45
+ };
46
+ export declare enum FetchErrorCode {
47
+ AccessDenied = "ACCESS_DENIED",
48
+ AuthenticationFailed = "AUTHENTICATION_FAILED",
49
+ RetryLater = "RETRY_LATER",
50
+ UnknownRef = "UNKNOWN_REF"
51
+ }
52
+ export declare type HttpHeader = {
53
+ name: Scalars['String'];
54
+ value?: InputMaybe<Scalars['String']>;
55
+ };
56
+ export declare type Message = {
57
+ __typename?: 'Message';
58
+ body: Scalars['String'];
59
+ level: MessageLevel;
60
+ };
61
+ export declare enum MessageLevel {
62
+ Error = "ERROR",
63
+ Info = "INFO",
64
+ Warn = "WARN"
65
+ }
66
+ export declare type Mutation = {
67
+ __typename?: 'Mutation';
68
+ reportError: Scalars['Boolean'];
69
+ };
70
+ export declare type MutationReportErrorArgs = {
71
+ report?: InputMaybe<ApiMonitoringReport>;
72
+ };
73
+ export declare type Query = {
74
+ __typename?: 'Query';
75
+ _empty?: Maybe<Scalars['String']>;
76
+ routerConfig: RouterConfigResponse;
77
+ };
78
+ export declare type QueryRouterConfigArgs = {
79
+ apiKey: Scalars['String'];
80
+ ifAfterId?: InputMaybe<Scalars['ID']>;
81
+ ref: Scalars['String'];
82
+ };
83
+ export declare type Request = {
84
+ body?: InputMaybe<Scalars['String']>;
85
+ headers?: InputMaybe<Array<HttpHeader>>;
86
+ url: Scalars['String'];
87
+ };
88
+ export declare type Response = {
89
+ body?: InputMaybe<Scalars['String']>;
90
+ headers?: InputMaybe<Array<HttpHeader>>;
91
+ httpStatusCode: Scalars['Int'];
92
+ };
93
+ export declare type RouterConfigResponse = FetchError | RouterConfigResult | Unchanged;
94
+ export declare type RouterConfigResult = {
95
+ __typename?: 'RouterConfigResult';
96
+ id: Scalars['ID'];
97
+ messages: Array<Message>;
98
+ supergraphSDL: Scalars['String'];
99
+ };
100
+ export declare type Unchanged = {
101
+ __typename?: 'Unchanged';
102
+ id: Scalars['ID'];
103
+ };
104
+ export declare type SupergraphSdlQueryVariables = Exact<{
105
+ apiKey: Scalars['String'];
106
+ ref: Scalars['String'];
107
+ ifAfterId?: InputMaybe<Scalars['ID']>;
108
+ }>;
109
+ export declare type SupergraphSdlQuery = {
110
+ __typename?: 'Query';
111
+ routerConfig: {
112
+ __typename: 'FetchError';
113
+ code: FetchErrorCode;
114
+ message: string;
115
+ } | {
116
+ __typename: 'RouterConfigResult';
117
+ id: string;
118
+ supergraphSdl: string;
119
+ } | {
120
+ __typename: 'Unchanged';
121
+ };
122
+ };
123
+ export declare type OobReportMutationVariables = Exact<{
124
+ input?: InputMaybe<ApiMonitoringReport>;
125
+ }>;
126
+ export declare type OobReportMutation = {
127
+ __typename?: 'Mutation';
128
+ reportError: boolean;
129
+ };
130
+ //# sourceMappingURL=graphqlTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphqlTypes.d.ts","sourceRoot":"","sources":["../../src/__generated__/graphqlTypes.ts"],"names":[],"mappings":"AAAA,oBAAY,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAChC,oBAAY,UAAU,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AACrC,oBAAY,KAAK,CAAC,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AACnF,oBAAY,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,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CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,UAAU,EAAE,oBAAoB,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,UAAU,EAAE,WAAW,CAAA;KAAE,CAAA;CAAE,CAAC;AAErP,oBAAY,0BAA0B,GAAG,KAAK,CAAC;IAC7C,KAAK,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC,CAAC;CACzC,CAAC,CAAC;AAGH,oBAAY,iBAAiB,GAAG;IAAE,UAAU,CAAC,EAAE,UAAU,CAAC;IAAC,WAAW,EAAE,OAAO,CAAA;CAAE,CAAC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MessageLevel = exports.FetchErrorCode = exports.ErrorCode = void 0;
4
+ var ErrorCode;
5
+ (function (ErrorCode) {
6
+ ErrorCode["ConnectionFailed"] = "CONNECTION_FAILED";
7
+ ErrorCode["InvalidBody"] = "INVALID_BODY";
8
+ ErrorCode["Other"] = "OTHER";
9
+ ErrorCode["Timeout"] = "TIMEOUT";
10
+ ErrorCode["UnexpectedResponse"] = "UNEXPECTED_RESPONSE";
11
+ })(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));
12
+ var FetchErrorCode;
13
+ (function (FetchErrorCode) {
14
+ FetchErrorCode["AccessDenied"] = "ACCESS_DENIED";
15
+ FetchErrorCode["AuthenticationFailed"] = "AUTHENTICATION_FAILED";
16
+ FetchErrorCode["RetryLater"] = "RETRY_LATER";
17
+ FetchErrorCode["UnknownRef"] = "UNKNOWN_REF";
18
+ })(FetchErrorCode = exports.FetchErrorCode || (exports.FetchErrorCode = {}));
19
+ var MessageLevel;
20
+ (function (MessageLevel) {
21
+ MessageLevel["Error"] = "ERROR";
22
+ MessageLevel["Info"] = "INFO";
23
+ MessageLevel["Warn"] = "WARN";
24
+ })(MessageLevel = exports.MessageLevel || (exports.MessageLevel = {}));
25
+ //# sourceMappingURL=graphqlTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphqlTypes.js","sourceRoot":"","sources":["../../src/__generated__/graphqlTypes.ts"],"names":[],"mappings":";;;AA+BA,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,mDAAsC,CAAA;IACtC,yCAA4B,CAAA;IAC5B,4BAAe,CAAA;IACf,gCAAmB,CAAA;IACnB,uDAA0C,CAAA;AAC5C,CAAC,EANW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAMpB;AAQD,IAAY,cASX;AATD,WAAY,cAAc;IAExB,gDAA8B,CAAA;IAE9B,gEAA8C,CAAA;IAE9C,4CAA0B,CAAA;IAE1B,4CAA0B,CAAA;AAC5B,CAAC,EATW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QASzB;AAaD,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,6BAAa,CAAA;IACb,6BAAa,CAAA;AACf,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB"}
@@ -0,0 +1,106 @@
1
+ import { GraphQLError, GraphQLSchema } from "graphql";
2
+ import { HeadersInit } from "node-fetch";
3
+ import { fetch } from 'apollo-server-env';
4
+ import { GraphQLRequestContextExecutionDidStart, Logger } from "apollo-server-types";
5
+ import { GraphQLDataSource } from './datasources/types';
6
+ import { QueryPlan } from '@apollo/query-planner';
7
+ import { OperationContext } from './operationContext';
8
+ import { ServiceMap } from './executeQueryPlan';
9
+ import { ServiceDefinition } from "@apollo/federation-internals";
10
+ export declare type ServiceEndpointDefinition = Pick<ServiceDefinition, 'name' | 'url'>;
11
+ export declare type Experimental_DidResolveQueryPlanCallback = ({ queryPlan, serviceMap, operationContext, requestContext, }: {
12
+ readonly queryPlan: QueryPlan;
13
+ readonly serviceMap: ServiceMap;
14
+ readonly operationContext: OperationContext;
15
+ readonly requestContext: GraphQLRequestContextExecutionDidStart<Record<string, any>>;
16
+ }) => void;
17
+ interface ImplementingServiceLocation {
18
+ name: string;
19
+ path: string;
20
+ }
21
+ export interface CompositionMetadata {
22
+ formatVersion: number;
23
+ id: string;
24
+ implementingServiceLocations: ImplementingServiceLocation[];
25
+ schemaHash: string;
26
+ }
27
+ export declare type Experimental_DidFailCompositionCallback = ({ errors, serviceList, compositionMetadata, }: {
28
+ readonly errors: GraphQLError[];
29
+ readonly serviceList: ServiceDefinition[];
30
+ readonly compositionMetadata?: CompositionMetadata;
31
+ }) => void;
32
+ export interface ServiceDefinitionCompositionInfo {
33
+ serviceDefinitions: ServiceDefinition[];
34
+ schema: GraphQLSchema;
35
+ compositionMetadata?: CompositionMetadata;
36
+ }
37
+ export interface SupergraphSdlCompositionInfo {
38
+ schema: GraphQLSchema;
39
+ compositionId: string;
40
+ supergraphSdl: string;
41
+ }
42
+ export declare type CompositionInfo = ServiceDefinitionCompositionInfo | SupergraphSdlCompositionInfo;
43
+ export declare type Experimental_DidUpdateCompositionCallback = (currentConfig: CompositionInfo, previousConfig?: CompositionInfo) => void;
44
+ export declare type CompositionUpdate = ServiceDefinitionUpdate | SupergraphSdlUpdate;
45
+ export interface ServiceDefinitionUpdate {
46
+ serviceDefinitions?: ServiceDefinition[];
47
+ compositionMetadata?: CompositionMetadata;
48
+ isNewSchema: boolean;
49
+ }
50
+ export interface SupergraphSdlUpdate {
51
+ id: string;
52
+ supergraphSdl: string;
53
+ }
54
+ export declare function isSupergraphSdlUpdate(update: CompositionUpdate): update is SupergraphSdlUpdate;
55
+ export declare function isServiceDefinitionUpdate(update: CompositionUpdate): update is ServiceDefinitionUpdate;
56
+ export declare type Experimental_UpdateServiceDefinitions = (config: DynamicGatewayConfig) => Promise<ServiceDefinitionUpdate>;
57
+ export declare type Experimental_UpdateSupergraphSdl = (config: DynamicGatewayConfig) => Promise<SupergraphSdlUpdate>;
58
+ export declare type Experimental_UpdateComposition = (config: DynamicGatewayConfig) => Promise<CompositionUpdate>;
59
+ interface GatewayConfigBase {
60
+ debug?: boolean;
61
+ logger?: Logger;
62
+ __exposeQueryPlanExperimental?: boolean;
63
+ buildService?: (definition: ServiceEndpointDefinition) => GraphQLDataSource;
64
+ experimental_didResolveQueryPlan?: Experimental_DidResolveQueryPlanCallback;
65
+ experimental_didFailComposition?: Experimental_DidFailCompositionCallback;
66
+ experimental_didUpdateComposition?: Experimental_DidUpdateCompositionCallback;
67
+ experimental_pollInterval?: number;
68
+ experimental_approximateQueryPlanStoreMiB?: number;
69
+ experimental_autoFragmentization?: boolean;
70
+ fetcher?: typeof fetch;
71
+ serviceHealthCheck?: boolean;
72
+ }
73
+ export interface RemoteGatewayConfig extends GatewayConfigBase {
74
+ serviceList: ServiceEndpointDefinition[];
75
+ introspectionHeaders?: HeadersInit | ((service: ServiceEndpointDefinition) => Promise<HeadersInit> | HeadersInit);
76
+ }
77
+ export interface ManagedGatewayConfig extends GatewayConfigBase {
78
+ schemaConfigDeliveryEndpoint?: string;
79
+ uplinkEndpoints?: string[];
80
+ uplinkMaxRetries?: number;
81
+ }
82
+ interface ManuallyManagedServiceDefsGatewayConfig extends GatewayConfigBase {
83
+ experimental_updateServiceDefinitions: Experimental_UpdateServiceDefinitions;
84
+ }
85
+ interface ManuallyManagedSupergraphSdlGatewayConfig extends GatewayConfigBase {
86
+ experimental_updateSupergraphSdl: Experimental_UpdateSupergraphSdl;
87
+ }
88
+ declare type ManuallyManagedGatewayConfig = ManuallyManagedServiceDefsGatewayConfig | ManuallyManagedSupergraphSdlGatewayConfig;
89
+ interface LocalGatewayConfig extends GatewayConfigBase {
90
+ localServiceList: ServiceDefinition[];
91
+ }
92
+ interface SupergraphSdlGatewayConfig extends GatewayConfigBase {
93
+ supergraphSdl: string;
94
+ }
95
+ export declare type StaticGatewayConfig = LocalGatewayConfig | SupergraphSdlGatewayConfig;
96
+ declare type DynamicGatewayConfig = ManagedGatewayConfig | RemoteGatewayConfig | ManuallyManagedGatewayConfig;
97
+ export declare type GatewayConfig = StaticGatewayConfig | DynamicGatewayConfig;
98
+ export declare function isLocalConfig(config: GatewayConfig): config is LocalGatewayConfig;
99
+ export declare function isRemoteConfig(config: GatewayConfig): config is RemoteGatewayConfig;
100
+ export declare function isSupergraphSdlConfig(config: GatewayConfig): config is SupergraphSdlGatewayConfig;
101
+ export declare function isManuallyManagedConfig(config: GatewayConfig): config is ManuallyManagedGatewayConfig;
102
+ export declare function isManagedConfig(config: GatewayConfig): config is ManagedGatewayConfig;
103
+ export declare function isStaticConfig(config: GatewayConfig): config is StaticGatewayConfig;
104
+ export declare function isDynamicConfig(config: GatewayConfig): config is DynamicGatewayConfig;
105
+ export {};
106
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,sCAAsC,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,oBAAY,yBAAyB,GAAG,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC;AAEhF,oBAAY,wCAAwC,GAAG,CAAC,EACtD,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,cAAc,GACf,EAAE;IACD,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,UAAU,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AoB,CAQhC;AAGD,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,IAAI,mBAAmB,CAEnF;AAGD,wBAAgB,eAAe,CAC7B,MAAM,EAAE,aAAa,GACpB,MAAM,IAAI,oBAAoB,CAMhC"}
package/dist/config.js ADDED
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isDynamicConfig = exports.isStaticConfig = exports.isManagedConfig = exports.isManuallyManagedConfig = exports.isSupergraphSdlConfig = exports.isRemoteConfig = exports.isLocalConfig = exports.isServiceDefinitionUpdate = exports.isSupergraphSdlUpdate = void 0;
4
+ function isSupergraphSdlUpdate(update) {
5
+ return 'supergraphSdl' in update;
6
+ }
7
+ exports.isSupergraphSdlUpdate = isSupergraphSdlUpdate;
8
+ function isServiceDefinitionUpdate(update) {
9
+ return 'isNewSchema' in update;
10
+ }
11
+ exports.isServiceDefinitionUpdate = isServiceDefinitionUpdate;
12
+ function isLocalConfig(config) {
13
+ return 'localServiceList' in config;
14
+ }
15
+ exports.isLocalConfig = isLocalConfig;
16
+ function isRemoteConfig(config) {
17
+ return 'serviceList' in config;
18
+ }
19
+ exports.isRemoteConfig = isRemoteConfig;
20
+ function isSupergraphSdlConfig(config) {
21
+ return 'supergraphSdl' in config;
22
+ }
23
+ exports.isSupergraphSdlConfig = isSupergraphSdlConfig;
24
+ function isManuallyManagedConfig(config) {
25
+ return ('experimental_updateServiceDefinitions' in config ||
26
+ 'experimental_updateSupergraphSdl' in config);
27
+ }
28
+ exports.isManuallyManagedConfig = isManuallyManagedConfig;
29
+ function isManagedConfig(config) {
30
+ return ('schemaConfigDeliveryEndpoint' in config ||
31
+ (!isRemoteConfig(config) &&
32
+ !isLocalConfig(config) &&
33
+ !isSupergraphSdlConfig(config) &&
34
+ !isManuallyManagedConfig(config)));
35
+ }
36
+ exports.isManagedConfig = isManagedConfig;
37
+ function isStaticConfig(config) {
38
+ return isLocalConfig(config) || isSupergraphSdlConfig(config);
39
+ }
40
+ exports.isStaticConfig = isStaticConfig;
41
+ function isDynamicConfig(config) {
42
+ return (isRemoteConfig(config) ||
43
+ isManagedConfig(config) ||
44
+ isManuallyManagedConfig(config));
45
+ }
46
+ exports.isDynamicConfig = isDynamicConfig;
47
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;AAkFA,SAAgB,qBAAqB,CAAC,MAAyB;IAC7D,OAAO,eAAe,IAAI,MAAM,CAAC;AACnC,CAAC;AAFD,sDAEC;AAED,SAAgB,yBAAyB,CACvC,MAAyB;IAEzB,OAAO,aAAa,IAAI,MAAM,CAAC;AACjC,CAAC;AAJD,8DAIC;AAsFD,SAAgB,aAAa,CAAC,MAAqB;IACjD,OAAO,kBAAkB,IAAI,MAAM,CAAC;AACtC,CAAC;AAFD,sCAEC;AAED,SAAgB,cAAc,CAAC,MAAqB;IAClD,OAAO,aAAa,IAAI,MAAM,CAAC;AACjC,CAAC;AAFD,wCAEC;AAED,SAAgB,qBAAqB,CAAC,MAAqB;IACzD,OAAO,eAAe,IAAI,MAAM,CAAC;AACnC,CAAC;AAFD,sDAEC;AAID,SAAgB,uBAAuB,CACrC,MAAqB;IAErB,OAAO,CACL,uCAAuC,IAAI,MAAM;QACjD,kCAAkC,IAAI,MAAM,CAC7C,CAAC;AACJ,CAAC;AAPD,0DAOC;AAGD,SAAgB,eAAe,CAC7B,MAAqB;IAErB,OAAO,CACL,8BAA8B,IAAI,MAAM;QACxC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC;YACtB,CAAC,aAAa,CAAC,MAAM,CAAC;YACtB,CAAC,qBAAqB,CAAC,MAAM,CAAC;YAC9B,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC,CACpC,CAAC;AACJ,CAAC;AAVD,0CAUC;AAGD,SAAgB,cAAc,CAAC,MAAqB;IAClD,OAAO,aAAa,CAAC,MAAM,CAAC,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAChE,CAAC;AAFD,wCAEC;AAGD,SAAgB,eAAe,CAC7B,MAAqB;IAErB,OAAO,CACL,cAAc,CAAC,MAAM,CAAC;QACtB,eAAe,CAAC,MAAM,CAAC;QACvB,uBAAuB,CAAC,MAAM,CAAC,CAChC,CAAC;AACJ,CAAC;AARD,0CAQC"}
@@ -1,10 +1,10 @@
1
- import { GraphQLRequestContext, GraphQLResponse } from 'apollo-server-types';
1
+ import { GraphQLResponse } from 'apollo-server-types';
2
2
  import { GraphQLSchema, DocumentNode } from 'graphql';
3
- import { GraphQLDataSource } from './types';
3
+ import { GraphQLDataSource, GraphQLDataSourceProcessOptions } from './types';
4
4
  export declare class LocalGraphQLDataSource<TContext extends Record<string, any> = Record<string, any>> implements GraphQLDataSource<TContext> {
5
5
  readonly schema: GraphQLSchema;
6
6
  constructor(schema: GraphQLSchema);
7
- process({ request, context, }: Pick<GraphQLRequestContext<TContext>, 'request' | 'context'>): Promise<GraphQLResponse>;
7
+ process({ request, context, }: GraphQLDataSourceProcessOptions<TContext>): Promise<GraphQLResponse>;
8
8
  sdl(): DocumentNode;
9
9
  }
10
10
  //# sourceMappingURL=LocalGraphQLDataSource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocalGraphQLDataSource.d.ts","sourceRoot":"","sources":["../../src/datasources/LocalGraphQLDataSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EACL,aAAa,EAGb,YAAY,EAEb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAK5C,qBAAa,sBAAsB,CAAC,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAE,YAAW,iBAAiB,CAAC,QAAQ,CAAC;aACxG,MAAM,EAAE,aAAa;gBAArB,MAAM,EAAE,aAAa;IAI3C,OAAO,CAAC,EACZ,OAAO,EACP,OAAO,GACR,EAAE,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC,GAAG,OAAO,CACvE,eAAe,CAChB;IAUM,GAAG,IAAI,YAAY;CAY3B"}
1
+ {"version":3,"file":"LocalGraphQLDataSource.d.ts","sourceRoot":"","sources":["../../src/datasources/LocalGraphQLDataSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EACL,aAAa,EAGb,YAAY,EAEb,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,iBAAiB,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAE7E,qBAAa,sBAAsB,CACjC,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAC1D,YAAW,iBAAiB,CAAC,QAAQ,CAAC;aAEV,MAAM,EAAE,aAAa;gBAArB,MAAM,EAAE,aAAa;IAI3C,OAAO,CAAC,EACZ,OAAO,EACP,OAAO,GACR,EAAE,+BAA+B,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC;IAUhE,GAAG,IAAI,YAAY;CAY3B"}
@@ -6,10 +6,10 @@ const schemaInstrumentation_1 = require("apollo-server-core/dist/utils/schemaIns
6
6
  class LocalGraphQLDataSource {
7
7
  constructor(schema) {
8
8
  this.schema = schema;
9
- schemaInstrumentation_1.enablePluginsForSchemaResolvers(schema);
9
+ (0, schemaInstrumentation_1.enablePluginsForSchemaResolvers)(schema);
10
10
  }
11
11
  async process({ request, context, }) {
12
- return graphql_1.graphql({
12
+ return (0, graphql_1.graphql)({
13
13
  schema: this.schema,
14
14
  source: request.query,
15
15
  variableValues: request.variables,
@@ -18,15 +18,15 @@ class LocalGraphQLDataSource {
18
18
  });
19
19
  }
20
20
  sdl() {
21
- const result = graphql_1.graphqlSync({
21
+ const result = (0, graphql_1.graphqlSync)({
22
22
  schema: this.schema,
23
23
  source: `{ _service { sdl }}`,
24
24
  });
25
25
  if (result.errors) {
26
- throw new Error(result.errors.map(error => error.message).join('\n\n'));
26
+ throw new Error(result.errors.map((error) => error.message).join('\n\n'));
27
27
  }
28
28
  const sdl = result.data && result.data._service && result.data._service.sdl;
29
- return graphql_1.parse(sdl);
29
+ return (0, graphql_1.parse)(sdl);
30
30
  }
31
31
  }
32
32
  exports.LocalGraphQLDataSource = LocalGraphQLDataSource;
@@ -1 +1 @@
1
- {"version":3,"file":"LocalGraphQLDataSource.js","sourceRoot":"","sources":["../../src/datasources/LocalGraphQLDataSource.ts"],"names":[],"mappings":";;;AACA,qCAMiB;AAEjB,+FAE6D;AAE7D,MAAa,sBAAsB;IACjC,YAA4B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;QAC/C,uDAA+B,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EACZ,OAAO,EACP,OAAO,GACsD;QAG7D,OAAO,iBAAO,CAAC;YACb,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,OAAO,CAAC,KAAM;YACtB,cAAc,EAAE,OAAO,CAAC,SAAS;YACjC,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,YAAY,EAAE,OAAO;SACtB,CAAC,CAAC;IACL,CAAC;IAEM,GAAG;QACR,MAAM,MAAM,GAAG,qBAAW,CAAC;YACzB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,qBAAqB;SAC9B,CAAC,CAAC;QACH,IAAI,MAAM,CAAC,MAAM,EAAE;YACjB,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,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C,GAAG,CAAC;QAC5E,OAAO,IAAA,eAAK,EAAC,GAAG,CAAC,CAAC;IACpB,CAAC;CACF;AAjCD,wDAiCC"}
@@ -1,17 +1,19 @@
1
1
  import { GraphQLRequestContext, GraphQLResponse, ValueOrPromise } from 'apollo-server-types';
2
2
  import { ApolloError } from 'apollo-server-errors';
3
3
  import { fetch, Request, Response } from 'apollo-server-env';
4
- import { GraphQLDataSource } from './types';
4
+ import { GraphQLDataSource, GraphQLDataSourceProcessOptions } from './types';
5
5
  export declare class RemoteGraphQLDataSource<TContext extends Record<string, any> = Record<string, any>> implements GraphQLDataSource<TContext> {
6
6
  fetcher: typeof fetch;
7
7
  constructor(config?: Partial<RemoteGraphQLDataSource<TContext>> & object & ThisType<RemoteGraphQLDataSource<TContext>>);
8
8
  url: string;
9
9
  apq: boolean;
10
- process({ request, context, }: Pick<GraphQLRequestContext<TContext>, 'request' | 'context'>): Promise<GraphQLResponse>;
10
+ honorSubgraphCacheControlHeader: boolean;
11
+ process(options: GraphQLDataSourceProcessOptions<TContext>): Promise<GraphQLResponse>;
11
12
  private sendRequest;
12
- willSendRequest?(requestContext: Pick<GraphQLRequestContext<TContext>, 'request' | 'context'>): ValueOrPromise<void>;
13
+ willSendRequest?(options: GraphQLDataSourceProcessOptions<TContext>): ValueOrPromise<void>;
14
+ private respond;
13
15
  didReceiveResponse?(requestContext: Required<Pick<GraphQLRequestContext<TContext>, 'request' | 'response' | 'context'>>): ValueOrPromise<GraphQLResponse>;
14
- didEncounterError(error: Error, _fetchRequest: Request, _fetchResponse?: Response): void;
16
+ didEncounterError(error: Error, _fetchRequest: Request, _fetchResponse?: Response, _context?: TContext): void;
15
17
  parseBody(fetchResponse: Response, _fetchRequest?: Request, _context?: TContext): Promise<object | string>;
16
18
  errorFromResponse(response: Response): Promise<ApolloError>;
17
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteGraphQLDataSource.d.ts","sourceRoot":"","sources":["../../src/datasources/RemoteGraphQLDataSource.ts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