@aws-amplify/api-graphql 4.4.1-events.619318.0 → 4.4.1

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 (98) hide show
  1. package/dist/cjs/Providers/AWSAppSyncRealTimeProvider/index.js +732 -35
  2. package/dist/cjs/Providers/AWSAppSyncRealTimeProvider/index.js.map +1 -1
  3. package/dist/cjs/Providers/constants.js +2 -32
  4. package/dist/cjs/Providers/constants.js.map +1 -1
  5. package/dist/cjs/index.js +1 -4
  6. package/dist/cjs/index.js.map +1 -1
  7. package/dist/cjs/internals/InternalGraphQLAPI.js +67 -8
  8. package/dist/cjs/internals/InternalGraphQLAPI.js.map +1 -1
  9. package/dist/cjs/utils/ReconnectionMonitor.js +1 -1
  10. package/dist/cjs/utils/ReconnectionMonitor.js.map +1 -1
  11. package/dist/cjs/utils/resolveConfig.js +0 -19
  12. package/dist/cjs/utils/resolveConfig.js.map +1 -1
  13. package/dist/esm/Providers/AWSAppSyncRealTimeProvider/index.d.ts +71 -24
  14. package/dist/esm/Providers/AWSAppSyncRealTimeProvider/index.mjs +732 -35
  15. package/dist/esm/Providers/AWSAppSyncRealTimeProvider/index.mjs.map +1 -1
  16. package/dist/esm/Providers/constants.d.ts +3 -33
  17. package/dist/esm/Providers/constants.mjs +2 -32
  18. package/dist/esm/Providers/constants.mjs.map +1 -1
  19. package/dist/esm/index.d.ts +0 -3
  20. package/dist/esm/index.mjs +0 -2
  21. package/dist/esm/index.mjs.map +1 -1
  22. package/dist/esm/internals/InternalGraphQLAPI.d.ts +1 -0
  23. package/dist/esm/internals/InternalGraphQLAPI.mjs +68 -9
  24. package/dist/esm/internals/InternalGraphQLAPI.mjs.map +1 -1
  25. package/dist/esm/utils/ConnectionStateMonitor.d.ts +1 -29
  26. package/dist/esm/utils/ReconnectionMonitor.d.ts +1 -1
  27. package/dist/esm/utils/ReconnectionMonitor.mjs +1 -1
  28. package/dist/esm/utils/ReconnectionMonitor.mjs.map +1 -1
  29. package/dist/esm/utils/resolveConfig.mjs +0 -19
  30. package/dist/esm/utils/resolveConfig.mjs.map +1 -1
  31. package/package.json +4 -4
  32. package/src/Providers/AWSAppSyncRealTimeProvider/index.ts +1051 -58
  33. package/src/Providers/constants.ts +2 -32
  34. package/src/index.ts +0 -5
  35. package/src/internals/InternalGraphQLAPI.ts +102 -15
  36. package/src/utils/ConnectionStateMonitor.ts +13 -2
  37. package/src/utils/ReconnectionMonitor.ts +1 -1
  38. package/src/utils/resolveConfig.ts +0 -23
  39. package/dist/cjs/Providers/AWSAppSyncEventsProvider/index.js +0 -94
  40. package/dist/cjs/Providers/AWSAppSyncEventsProvider/index.js.map +0 -1
  41. package/dist/cjs/Providers/AWSWebSocketProvider/appsyncUrl.js +0 -112
  42. package/dist/cjs/Providers/AWSWebSocketProvider/appsyncUrl.js.map +0 -1
  43. package/dist/cjs/Providers/AWSWebSocketProvider/authHeaders.js +0 -99
  44. package/dist/cjs/Providers/AWSWebSocketProvider/authHeaders.js.map +0 -1
  45. package/dist/cjs/Providers/AWSWebSocketProvider/index.js +0 -623
  46. package/dist/cjs/Providers/AWSWebSocketProvider/index.js.map +0 -1
  47. package/dist/cjs/internals/events/appsyncRequest.js +0 -97
  48. package/dist/cjs/internals/events/appsyncRequest.js.map +0 -1
  49. package/dist/cjs/internals/events/index.js +0 -73
  50. package/dist/cjs/internals/events/index.js.map +0 -1
  51. package/dist/cjs/internals/events/types.js +0 -6
  52. package/dist/cjs/internals/events/types.js.map +0 -1
  53. package/dist/cjs/internals/events/utils.js +0 -57
  54. package/dist/cjs/internals/events/utils.js.map +0 -1
  55. package/dist/cjs/internals/graphqlAuth.js +0 -64
  56. package/dist/cjs/internals/graphqlAuth.js.map +0 -1
  57. package/dist/cjs/internals/graphqlRequest.js +0 -20
  58. package/dist/cjs/internals/graphqlRequest.js.map +0 -1
  59. package/dist/esm/Providers/AWSAppSyncEventsProvider/index.d.ts +0 -42
  60. package/dist/esm/Providers/AWSAppSyncEventsProvider/index.mjs +0 -93
  61. package/dist/esm/Providers/AWSAppSyncEventsProvider/index.mjs.map +0 -1
  62. package/dist/esm/Providers/AWSWebSocketProvider/appsyncUrl.d.ts +0 -21
  63. package/dist/esm/Providers/AWSWebSocketProvider/appsyncUrl.mjs +0 -106
  64. package/dist/esm/Providers/AWSWebSocketProvider/appsyncUrl.mjs.map +0 -1
  65. package/dist/esm/Providers/AWSWebSocketProvider/authHeaders.d.ts +0 -8
  66. package/dist/esm/Providers/AWSWebSocketProvider/authHeaders.mjs +0 -97
  67. package/dist/esm/Providers/AWSWebSocketProvider/authHeaders.mjs.map +0 -1
  68. package/dist/esm/Providers/AWSWebSocketProvider/index.d.ts +0 -83
  69. package/dist/esm/Providers/AWSWebSocketProvider/index.mjs +0 -621
  70. package/dist/esm/Providers/AWSWebSocketProvider/index.mjs.map +0 -1
  71. package/dist/esm/internals/events/appsyncRequest.d.ts +0 -14
  72. package/dist/esm/internals/events/appsyncRequest.mjs +0 -96
  73. package/dist/esm/internals/events/appsyncRequest.mjs.map +0 -1
  74. package/dist/esm/internals/events/index.d.ts +0 -17
  75. package/dist/esm/internals/events/index.mjs +0 -69
  76. package/dist/esm/internals/events/index.mjs.map +0 -1
  77. package/dist/esm/internals/events/types.d.ts +0 -23
  78. package/dist/esm/internals/events/types.mjs +0 -2
  79. package/dist/esm/internals/events/types.mjs.map +0 -1
  80. package/dist/esm/internals/events/utils.d.ts +0 -16
  81. package/dist/esm/internals/events/utils.mjs +0 -53
  82. package/dist/esm/internals/events/utils.mjs.map +0 -1
  83. package/dist/esm/internals/graphqlAuth.d.ts +0 -3
  84. package/dist/esm/internals/graphqlAuth.mjs +0 -64
  85. package/dist/esm/internals/graphqlAuth.mjs.map +0 -1
  86. package/dist/esm/internals/graphqlRequest.d.ts +0 -3
  87. package/dist/esm/internals/graphqlRequest.mjs +0 -18
  88. package/dist/esm/internals/graphqlRequest.mjs.map +0 -1
  89. package/src/Providers/AWSAppSyncEventsProvider/index.ts +0 -187
  90. package/src/Providers/AWSWebSocketProvider/appsyncUrl.ts +0 -151
  91. package/src/Providers/AWSWebSocketProvider/authHeaders.ts +0 -146
  92. package/src/Providers/AWSWebSocketProvider/index.ts +0 -925
  93. package/src/internals/events/appsyncRequest.ts +0 -169
  94. package/src/internals/events/index.ts +0 -138
  95. package/src/internals/events/types.ts +0 -35
  96. package/src/internals/events/utils.ts +0 -77
  97. package/src/internals/graphqlAuth.ts +0 -87
  98. package/src/internals/graphqlRequest.ts +0 -30
@@ -1,187 +0,0 @@
1
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- // SPDX-License-Identifier: Apache-2.0
3
- import {
4
- CustomUserAgentDetails,
5
- DocumentType,
6
- GraphQLAuthMode,
7
- USER_AGENT_HEADER,
8
- getAmplifyUserAgent,
9
- } from '@aws-amplify/core/internals/utils';
10
- import { CustomHeaders } from '@aws-amplify/data-schema/runtime';
11
-
12
- import { MESSAGE_TYPES } from '../constants';
13
- import { AWSWebSocketProvider } from '../AWSWebSocketProvider';
14
- import { awsRealTimeHeaderBasedAuth } from '../AWSWebSocketProvider/authHeaders';
15
-
16
- // resolved/actual AuthMode values. identityPool gets resolves to IAM upstream in InternalGraphQLAPI._graphqlSubscribe
17
- type ResolvedGraphQLAuthModes = Exclude<GraphQLAuthMode, 'identityPool'>;
18
-
19
- interface AWSAppSyncEventProviderOptions {
20
- appSyncGraphqlEndpoint?: string;
21
- authenticationType?: ResolvedGraphQLAuthModes;
22
- query?: string;
23
- variables?: DocumentType;
24
- apiKey?: string;
25
- region?: string;
26
- libraryConfigHeaders?(): Promise<Record<string, unknown> | Headers>;
27
- additionalHeaders?: CustomHeaders;
28
- additionalCustomHeaders?: Record<string, string>;
29
- authToken?: string;
30
- }
31
-
32
- interface DataPayload {
33
- id: string;
34
- event: string;
35
- type: string;
36
- }
37
-
38
- interface DataResponse {
39
- id: string;
40
- payload: string;
41
- type: string;
42
- }
43
-
44
- const PROVIDER_NAME = 'AWSAppSyncEventsProvider';
45
-
46
- class AWSAppSyncEventProvider extends AWSWebSocketProvider {
47
- constructor() {
48
- super(PROVIDER_NAME);
49
- }
50
-
51
- public async connect(options: AWSAppSyncEventProviderOptions) {
52
- super.connect(options);
53
- }
54
-
55
- public subscribe(
56
- options?: AWSAppSyncEventProviderOptions,
57
- customUserAgentDetails?: CustomUserAgentDetails,
58
- ) {
59
- return super.subscribe(options, customUserAgentDetails).pipe();
60
- }
61
-
62
- public async publish(
63
- options: AWSAppSyncEventProviderOptions,
64
- customUserAgentDetails?: CustomUserAgentDetails,
65
- ) {
66
- super.publish(options, customUserAgentDetails);
67
- }
68
-
69
- protected async _prepareSubscriptionPayload({
70
- options,
71
- subscriptionId,
72
- customUserAgentDetails,
73
- additionalCustomHeaders,
74
- libraryConfigHeaders,
75
- publish,
76
- }: {
77
- options: AWSAppSyncEventProviderOptions;
78
- subscriptionId: string;
79
- customUserAgentDetails: CustomUserAgentDetails | undefined;
80
- additionalCustomHeaders: Record<string, string>;
81
- libraryConfigHeaders: Record<string, string>;
82
- publish?: boolean;
83
- }): Promise<string> {
84
- const {
85
- appSyncGraphqlEndpoint,
86
- authenticationType,
87
- query,
88
- variables,
89
- apiKey,
90
- region,
91
- } = options;
92
-
93
- // This will be needed for WS publish
94
- // const data = {
95
- // events: [variables],
96
- // };
97
-
98
- const serializedData = JSON.stringify([variables]);
99
-
100
- const headers = {
101
- ...(await awsRealTimeHeaderBasedAuth({
102
- apiKey,
103
- appSyncGraphqlEndpoint,
104
- authenticationType,
105
- payload: serializedData,
106
- canonicalUri: '',
107
- region,
108
- additionalCustomHeaders,
109
- })),
110
- ...libraryConfigHeaders,
111
- ...additionalCustomHeaders,
112
- [USER_AGENT_HEADER]: getAmplifyUserAgent(customUserAgentDetails),
113
- };
114
-
115
- // Commented out code will be needed for WS publish
116
- const subscriptionMessage = {
117
- id: subscriptionId,
118
- channel: query,
119
- // events: [JSON.stringify(variables)],
120
- authorization: {
121
- ...headers,
122
- },
123
- // payload: {
124
- // events: serializedData,
125
- // extensions: {
126
- // authorization: {
127
- // ...headers,
128
- // },
129
- // },
130
- // },
131
- type: publish
132
- ? MESSAGE_TYPES.EVENT_PUBLISH
133
- : MESSAGE_TYPES.EVENT_SUBSCRIBE,
134
- };
135
-
136
- const serializedSubscriptionMessage = JSON.stringify(subscriptionMessage);
137
-
138
- return serializedSubscriptionMessage;
139
- }
140
-
141
- protected _handleSubscriptionData(
142
- message: MessageEvent,
143
- ): [boolean, DataResponse] {
144
- this.logger.debug(
145
- `subscription message from AWS AppSync Events: ${message.data}`,
146
- );
147
-
148
- const {
149
- id = '',
150
- event: payload,
151
- type,
152
- }: DataPayload = JSON.parse(String(message.data));
153
-
154
- const {
155
- observer = null,
156
- query = '',
157
- variables = {},
158
- } = this.subscriptionObserverMap.get(id) || {};
159
-
160
- this.logger.debug({ id, observer, query, variables });
161
-
162
- if (type === MESSAGE_TYPES.DATA && payload) {
163
- const deserializedEvent = JSON.parse(payload);
164
- if (observer) {
165
- observer.next(deserializedEvent);
166
- } else {
167
- this.logger.debug(`observer not found for id: ${id}`);
168
- }
169
-
170
- return [true, { id, type, payload: deserializedEvent }];
171
- }
172
-
173
- return [false, { id, type, payload }];
174
- }
175
-
176
- protected _unsubscribeMessage(subscriptionId: string): {
177
- id: string;
178
- type: string;
179
- } {
180
- return {
181
- id: subscriptionId,
182
- type: MESSAGE_TYPES.EVENT_STOP,
183
- };
184
- }
185
- }
186
-
187
- export const AppSyncEventProvider = new AWSAppSyncEventProvider();
@@ -1,151 +0,0 @@
1
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { RequestOptions } from '@aws-amplify/data-schema/runtime';
5
- import {
6
- AmplifyUrl,
7
- AmplifyUrlSearchParams,
8
- } from '@aws-amplify/core/internals/utils';
9
-
10
- import { AWSAppSyncRealTimeProviderOptions } from '../AWSAppSyncRealTimeProvider';
11
-
12
- const protocol = 'wss://';
13
- const standardDomainPattern =
14
- /^https:\/\/\w{26}\.appsync-api\.\w{2}(?:(?:-\w{2,})+)-\d\.amazonaws.com(?:\.cn)?\/graphql$/i;
15
- const eventDomainPattern =
16
- /^https:\/\/\w{26}\.ddpg-api\.\w{2}(?:(?:-\w{2,})+)-\d\.amazonaws.com(?:\.cn)?\/event$/i;
17
- const customDomainPath = '/realtime';
18
-
19
- export const isCustomDomain = (url: string): boolean => {
20
- return url.match(standardDomainPattern) === null;
21
- };
22
-
23
- const isEventDomain = (url: string): boolean =>
24
- url.match(eventDomainPattern) !== null;
25
-
26
- export const getRealtimeEndpointUrl = (
27
- appSyncGraphqlEndpoint: string | undefined,
28
- ): URL => {
29
- let realtimeEndpoint = appSyncGraphqlEndpoint ?? '';
30
-
31
- if (isEventDomain(realtimeEndpoint)) {
32
- realtimeEndpoint = realtimeEndpoint
33
- .concat(customDomainPath)
34
- .replace('ddpg-api', 'grt-gamma');
35
- } else if (isCustomDomain(realtimeEndpoint)) {
36
- realtimeEndpoint = realtimeEndpoint.concat(customDomainPath);
37
- } else {
38
- realtimeEndpoint = realtimeEndpoint
39
- .replace('appsync-api', 'appsync-realtime-api')
40
- .replace('gogi-beta', 'grt-beta')
41
- .replace('ddpg-api', 'grt-gamma');
42
- }
43
-
44
- realtimeEndpoint = realtimeEndpoint
45
- .replace('https://', protocol)
46
- .replace('http://', protocol);
47
-
48
- return new AmplifyUrl(realtimeEndpoint);
49
- };
50
-
51
- /**
52
- * Strips out `Authorization` header if present
53
- */
54
- const extractNonAuthHeaders = (
55
- headers?: AWSAppSyncRealTimeProviderOptions['additionalCustomHeaders'],
56
- ): Record<string, string> => {
57
- if (!headers) {
58
- return {};
59
- }
60
-
61
- if ('Authorization' in headers) {
62
- const { Authorization: _, ...nonAuthHeaders } = headers;
63
-
64
- return nonAuthHeaders;
65
- }
66
-
67
- return headers;
68
- };
69
-
70
- /**
71
- *
72
- * @param headers - http headers
73
- * @returns uri-encoded query parameters derived from custom headers
74
- */
75
- export const queryParamsFromCustomHeaders = (
76
- headers?: AWSAppSyncRealTimeProviderOptions['additionalCustomHeaders'],
77
- ): URLSearchParams => {
78
- const nonAuthHeaders = extractNonAuthHeaders(headers);
79
-
80
- const params = new AmplifyUrlSearchParams();
81
-
82
- Object.entries(nonAuthHeaders).forEach(([k, v]) => {
83
- params.append(k, v);
84
- });
85
-
86
- return params;
87
- };
88
-
89
- /**
90
- * Normalizes AppSync realtime endpoint URL
91
- *
92
- * @param appSyncGraphqlEndpoint - AppSync endpointUri from config
93
- * @param urlParams - URLSearchParams
94
- * @returns fully resolved string realtime endpoint URL
95
- */
96
- export const realtimeUrlWithQueryString = (
97
- appSyncGraphqlEndpoint: string | undefined,
98
- urlParams: URLSearchParams,
99
- ): string => {
100
- const realtimeEndpointUrl = getRealtimeEndpointUrl(appSyncGraphqlEndpoint);
101
-
102
- // preserves any query params a customer might manually set in the configuration
103
- const existingParams = new AmplifyUrlSearchParams(realtimeEndpointUrl.search);
104
-
105
- for (const [k, v] of urlParams.entries()) {
106
- existingParams.append(k, v);
107
- }
108
-
109
- realtimeEndpointUrl.search = existingParams.toString();
110
-
111
- return realtimeEndpointUrl.toString();
112
- };
113
-
114
- // TODO: move to separate file?
115
- export const additionalHeadersFromOptions = async (
116
- options: AWSAppSyncRealTimeProviderOptions,
117
- ) => {
118
- const {
119
- appSyncGraphqlEndpoint,
120
- query,
121
- libraryConfigHeaders = () => ({}),
122
- additionalHeaders = {},
123
- authToken,
124
- } = options;
125
-
126
- let additionalCustomHeaders = {};
127
- const _libraryConfigHeaders = await libraryConfigHeaders();
128
-
129
- if (typeof additionalHeaders === 'function') {
130
- const requestOptions: RequestOptions = {
131
- url: appSyncGraphqlEndpoint || '',
132
- queryString: query || '',
133
- };
134
- additionalCustomHeaders = await additionalHeaders(requestOptions);
135
- } else {
136
- additionalCustomHeaders = additionalHeaders;
137
- }
138
-
139
- // if an authorization header is set, have the explicit, operation-level authToken take precedence
140
- if (authToken) {
141
- additionalCustomHeaders = {
142
- ...additionalCustomHeaders,
143
- Authorization: authToken,
144
- };
145
- }
146
-
147
- return {
148
- additionalCustomHeaders,
149
- libraryConfigHeaders: _libraryConfigHeaders,
150
- };
151
- };
@@ -1,146 +0,0 @@
1
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { ConsoleLogger, fetchAuthSession } from '@aws-amplify/core';
5
- import { signRequest } from '@aws-amplify/core/internals/aws-client-utils';
6
- import { AmplifyUrl } from '@aws-amplify/core/internals/utils';
7
-
8
- import { AWS_APPSYNC_REALTIME_HEADERS } from '../constants';
9
- import { AWSAppSyncRealTimeProviderOptions } from '../AWSAppSyncRealTimeProvider';
10
-
11
- const logger = new ConsoleLogger('AWSAppSyncRealTimeProvider Auth');
12
-
13
- type AWSAppSyncRealTimeAuthInput =
14
- Partial<AWSAppSyncRealTimeProviderOptions> & {
15
- canonicalUri: string;
16
- payload: string;
17
- host?: string | undefined;
18
- };
19
-
20
- const awsAuthTokenHeader = async ({ host }: AWSAppSyncRealTimeAuthInput) => {
21
- const session = await fetchAuthSession();
22
-
23
- return {
24
- Authorization: session?.tokens?.accessToken?.toString(),
25
- host,
26
- };
27
- };
28
-
29
- const awsRealTimeApiKeyHeader = async ({
30
- apiKey,
31
- host,
32
- }: AWSAppSyncRealTimeAuthInput) => {
33
- const dt = new Date();
34
- const dtStr = dt.toISOString().replace(/[:-]|\.\d{3}/g, '');
35
-
36
- return {
37
- host,
38
- 'x-amz-date': dtStr,
39
- 'x-api-key': apiKey,
40
- };
41
- };
42
-
43
- const awsRealTimeIAMHeader = async ({
44
- payload,
45
- canonicalUri,
46
- appSyncGraphqlEndpoint,
47
- region,
48
- }: AWSAppSyncRealTimeAuthInput) => {
49
- const endpointInfo = {
50
- region,
51
- service: 'appsync',
52
- };
53
-
54
- const creds = (await fetchAuthSession()).credentials;
55
-
56
- const request = {
57
- url: `${appSyncGraphqlEndpoint}${canonicalUri}`,
58
- data: payload,
59
- method: 'POST',
60
- headers: { ...AWS_APPSYNC_REALTIME_HEADERS },
61
- };
62
-
63
- const signedParams = signRequest(
64
- {
65
- headers: request.headers,
66
- method: request.method,
67
- url: new AmplifyUrl(request.url),
68
- body: request.data,
69
- },
70
- {
71
- credentials: creds!,
72
- signingRegion: endpointInfo.region!,
73
- signingService: endpointInfo.service,
74
- },
75
- );
76
-
77
- return signedParams.headers;
78
- };
79
-
80
- const customAuthHeader = async ({
81
- host,
82
- additionalCustomHeaders,
83
- }: AWSAppSyncRealTimeAuthInput) => {
84
- /**
85
- * If `additionalHeaders` was provided to the subscription as a function,
86
- * the headers that are returned by that function will already have been
87
- * provided before this function is called.
88
- */
89
- if (!additionalCustomHeaders?.Authorization) {
90
- throw new Error('No auth token specified');
91
- }
92
-
93
- return {
94
- Authorization: additionalCustomHeaders.Authorization,
95
- host,
96
- };
97
- };
98
-
99
- export const awsRealTimeHeaderBasedAuth = async ({
100
- apiKey,
101
- authenticationType,
102
- canonicalUri,
103
- appSyncGraphqlEndpoint,
104
- region,
105
- additionalCustomHeaders,
106
- payload,
107
- }: AWSAppSyncRealTimeAuthInput): Promise<
108
- Record<string, string | undefined> | undefined
109
- > => {
110
- const headerHandler = {
111
- apiKey: awsRealTimeApiKeyHeader,
112
- iam: awsRealTimeIAMHeader,
113
- oidc: awsAuthTokenHeader,
114
- userPool: awsAuthTokenHeader,
115
- lambda: customAuthHeader,
116
- none: customAuthHeader,
117
- } as const;
118
-
119
- if (!authenticationType || !headerHandler[authenticationType]) {
120
- logger.debug(`Authentication type ${authenticationType} not supported`);
121
-
122
- return undefined;
123
- } else {
124
- const handler = headerHandler[authenticationType];
125
-
126
- const host = appSyncGraphqlEndpoint
127
- ? new AmplifyUrl(appSyncGraphqlEndpoint).host
128
- : undefined;
129
-
130
- const resolvedApiKey = authenticationType === 'apiKey' ? apiKey : undefined;
131
-
132
- logger.debug(`Authenticating with ${JSON.stringify(authenticationType)}`);
133
-
134
- const result = await handler({
135
- payload,
136
- canonicalUri,
137
- appSyncGraphqlEndpoint,
138
- apiKey: resolvedApiKey,
139
- region,
140
- host,
141
- additionalCustomHeaders,
142
- });
143
-
144
- return result;
145
- }
146
- };