@aws-amplify/api-graphql 0.0.0-unstable-1ca644b-20260128091132
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/README.md +3 -0
- package/dist/cjs/GraphQLAPI.js +66 -0
- package/dist/cjs/GraphQLAPI.js.map +1 -0
- package/dist/cjs/Providers/AWSAppSyncEventsProvider/index.js +117 -0
- package/dist/cjs/Providers/AWSAppSyncEventsProvider/index.js.map +1 -0
- package/dist/cjs/Providers/AWSAppSyncRealTimeProvider/index.js +96 -0
- package/dist/cjs/Providers/AWSAppSyncRealTimeProvider/index.js.map +1 -0
- package/dist/cjs/Providers/AWSWebSocketProvider/appsyncUrl.js +113 -0
- package/dist/cjs/Providers/AWSWebSocketProvider/appsyncUrl.js.map +1 -0
- package/dist/cjs/Providers/AWSWebSocketProvider/authHeaders.js +99 -0
- package/dist/cjs/Providers/AWSWebSocketProvider/authHeaders.js.map +1 -0
- package/dist/cjs/Providers/AWSWebSocketProvider/index.js +693 -0
- package/dist/cjs/Providers/AWSWebSocketProvider/index.js.map +1 -0
- package/dist/cjs/Providers/constants.js +149 -0
- package/dist/cjs/Providers/constants.js.map +1 -0
- package/dist/cjs/index.js +18 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/internals/InternalGraphQLAPI.js +269 -0
- package/dist/cjs/internals/InternalGraphQLAPI.js.map +1 -0
- package/dist/cjs/internals/events/appsyncRequest.js +96 -0
- package/dist/cjs/internals/events/appsyncRequest.js.map +1 -0
- package/dist/cjs/internals/events/index.js +142 -0
- package/dist/cjs/internals/events/index.js.map +1 -0
- package/dist/cjs/internals/events/types.js +6 -0
- package/dist/cjs/internals/events/types.js.map +1 -0
- package/dist/cjs/internals/events/utils.js +57 -0
- package/dist/cjs/internals/events/utils.js.map +1 -0
- package/dist/cjs/internals/generateClient.js +86 -0
- package/dist/cjs/internals/generateClient.js.map +1 -0
- package/dist/cjs/internals/graphqlAuth.js +63 -0
- package/dist/cjs/internals/graphqlAuth.js.map +1 -0
- package/dist/cjs/internals/graphqlRequest.js +19 -0
- package/dist/cjs/internals/graphqlRequest.js.map +1 -0
- package/dist/cjs/internals/index.js +16 -0
- package/dist/cjs/internals/index.js.map +1 -0
- package/dist/cjs/internals/server/generateClientWithAmplifyInstance.js +48 -0
- package/dist/cjs/internals/server/generateClientWithAmplifyInstance.js.map +1 -0
- package/dist/cjs/internals/server/index.js +9 -0
- package/dist/cjs/internals/server/index.js.map +1 -0
- package/dist/cjs/internals/types.js +4 -0
- package/dist/cjs/internals/types.js.map +1 -0
- package/dist/cjs/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.js +10 -0
- package/dist/cjs/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.js.map +1 -0
- package/dist/cjs/internals/utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.js +10 -0
- package/dist/cjs/internals/utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.js.map +1 -0
- package/dist/cjs/internals/utils/runtimeTypeGuards/isGraphQLResponseWithErrors.js +14 -0
- package/dist/cjs/internals/utils/runtimeTypeGuards/isGraphQLResponseWithErrors.js.map +1 -0
- package/dist/cjs/internals/v6.js +155 -0
- package/dist/cjs/internals/v6.js.map +1 -0
- package/dist/cjs/server/generateClient.js +42 -0
- package/dist/cjs/server/generateClient.js.map +1 -0
- package/dist/cjs/server/index.js +9 -0
- package/dist/cjs/server/index.js.map +1 -0
- package/dist/cjs/types/PubSub.js +49 -0
- package/dist/cjs/types/PubSub.js.map +1 -0
- package/dist/cjs/types/index.js +34 -0
- package/dist/cjs/types/index.js.map +1 -0
- package/dist/cjs/utils/ConnectionStateMonitor.js +134 -0
- package/dist/cjs/utils/ConnectionStateMonitor.js.map +1 -0
- package/dist/cjs/utils/ReachabilityMonitor/index.js +10 -0
- package/dist/cjs/utils/ReachabilityMonitor/index.js.map +1 -0
- package/dist/cjs/utils/ReachabilityMonitor/index.native.js +12 -0
- package/dist/cjs/utils/ReachabilityMonitor/index.native.js.map +1 -0
- package/dist/cjs/utils/ReconnectionMonitor.js +71 -0
- package/dist/cjs/utils/ReconnectionMonitor.js.map +1 -0
- package/dist/cjs/utils/errors/GraphQLApiError.js +21 -0
- package/dist/cjs/utils/errors/GraphQLApiError.js.map +1 -0
- package/dist/cjs/utils/errors/assertValidationError.js +18 -0
- package/dist/cjs/utils/errors/assertValidationError.js.map +1 -0
- package/dist/cjs/utils/errors/constants.js +47 -0
- package/dist/cjs/utils/errors/constants.js.map +1 -0
- package/dist/cjs/utils/errors/createGraphQLResultWithError.js +15 -0
- package/dist/cjs/utils/errors/createGraphQLResultWithError.js.map +1 -0
- package/dist/cjs/utils/errors/index.js +16 -0
- package/dist/cjs/utils/errors/index.js.map +1 -0
- package/dist/cjs/utils/errors/repackageAuthError.js +38 -0
- package/dist/cjs/utils/errors/repackageAuthError.js.map +1 -0
- package/dist/cjs/utils/errors/validation.js +28 -0
- package/dist/cjs/utils/errors/validation.js.map +1 -0
- package/dist/cjs/utils/index.js +11 -0
- package/dist/cjs/utils/index.js.map +1 -0
- package/dist/cjs/utils/resolveConfig.js +32 -0
- package/dist/cjs/utils/resolveConfig.js.map +1 -0
- package/dist/cjs/utils/resolveLibraryOptions.js +16 -0
- package/dist/cjs/utils/resolveLibraryOptions.js.map +1 -0
- package/dist/esm/GraphQLAPI.d.ts +37 -0
- package/dist/esm/GraphQLAPI.mjs +63 -0
- package/dist/esm/GraphQLAPI.mjs.map +1 -0
- package/dist/esm/Providers/AWSAppSyncEventsProvider/index.d.ts +49 -0
- package/dist/esm/Providers/AWSAppSyncEventsProvider/index.mjs +115 -0
- package/dist/esm/Providers/AWSAppSyncEventsProvider/index.mjs.map +1 -0
- package/dist/esm/Providers/AWSAppSyncRealTimeProvider/index.d.ts +47 -0
- package/dist/esm/Providers/AWSAppSyncRealTimeProvider/index.mjs +94 -0
- package/dist/esm/Providers/AWSAppSyncRealTimeProvider/index.mjs.map +1 -0
- package/dist/esm/Providers/AWSWebSocketProvider/appsyncUrl.d.ts +21 -0
- package/dist/esm/Providers/AWSWebSocketProvider/appsyncUrl.mjs +107 -0
- package/dist/esm/Providers/AWSWebSocketProvider/appsyncUrl.mjs.map +1 -0
- package/dist/esm/Providers/AWSWebSocketProvider/authHeaders.d.ts +8 -0
- package/dist/esm/Providers/AWSWebSocketProvider/authHeaders.mjs +97 -0
- package/dist/esm/Providers/AWSWebSocketProvider/authHeaders.mjs.map +1 -0
- package/dist/esm/Providers/AWSWebSocketProvider/index.d.ts +99 -0
- package/dist/esm/Providers/AWSWebSocketProvider/index.mjs +691 -0
- package/dist/esm/Providers/AWSWebSocketProvider/index.mjs.map +1 -0
- package/dist/esm/Providers/constants.d.ts +135 -0
- package/dist/esm/Providers/constants.mjs +147 -0
- package/dist/esm/Providers/constants.mjs.map +1 -0
- package/dist/esm/index.d.ts +6 -0
- package/dist/esm/index.mjs +7 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/internals/InternalGraphQLAPI.d.ts +45 -0
- package/dist/esm/internals/InternalGraphQLAPI.mjs +270 -0
- package/dist/esm/internals/InternalGraphQLAPI.mjs.map +1 -0
- package/dist/esm/internals/events/appsyncRequest.d.ts +14 -0
- package/dist/esm/internals/events/appsyncRequest.mjs +96 -0
- package/dist/esm/internals/events/appsyncRequest.mjs.map +1 -0
- package/dist/esm/internals/events/index.d.ts +58 -0
- package/dist/esm/internals/events/index.mjs +139 -0
- package/dist/esm/internals/events/index.mjs.map +1 -0
- package/dist/esm/internals/events/types.d.ts +93 -0
- package/dist/esm/internals/events/types.mjs +2 -0
- package/dist/esm/internals/events/types.mjs.map +1 -0
- package/dist/esm/internals/events/utils.d.ts +16 -0
- package/dist/esm/internals/events/utils.mjs +53 -0
- package/dist/esm/internals/events/utils.mjs.map +1 -0
- package/dist/esm/internals/generateClient.d.ts +12 -0
- package/dist/esm/internals/generateClient.mjs +85 -0
- package/dist/esm/internals/generateClient.mjs.map +1 -0
- package/dist/esm/internals/graphqlAuth.d.ts +3 -0
- package/dist/esm/internals/graphqlAuth.mjs +64 -0
- package/dist/esm/internals/graphqlAuth.mjs.map +1 -0
- package/dist/esm/internals/graphqlRequest.d.ts +3 -0
- package/dist/esm/internals/graphqlRequest.mjs +18 -0
- package/dist/esm/internals/graphqlRequest.mjs.map +1 -0
- package/dist/esm/internals/index.d.ts +4 -0
- package/dist/esm/internals/index.mjs +4 -0
- package/dist/esm/internals/index.mjs.map +1 -0
- package/dist/esm/internals/server/generateClientWithAmplifyInstance.d.ts +13 -0
- package/dist/esm/internals/server/generateClientWithAmplifyInstance.mjs +61 -0
- package/dist/esm/internals/server/generateClientWithAmplifyInstance.mjs.map +1 -0
- package/dist/esm/internals/server/index.d.ts +1 -0
- package/dist/esm/internals/server/index.mjs +2 -0
- package/dist/esm/internals/server/index.mjs.map +1 -0
- package/dist/esm/internals/types.d.ts +34 -0
- package/dist/esm/internals/types.mjs +2 -0
- package/dist/esm/internals/types.mjs.map +1 -0
- package/dist/esm/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.d.ts +2 -0
- package/dist/esm/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.mjs +8 -0
- package/dist/esm/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.mjs.map +1 -0
- package/dist/esm/internals/utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.d.ts +8 -0
- package/dist/esm/internals/utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.mjs +8 -0
- package/dist/esm/internals/utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.mjs.map +1 -0
- package/dist/esm/internals/utils/runtimeTypeGuards/isGraphQLResponseWithErrors.d.ts +2 -0
- package/dist/esm/internals/utils/runtimeTypeGuards/isGraphQLResponseWithErrors.mjs +12 -0
- package/dist/esm/internals/utils/runtimeTypeGuards/isGraphQLResponseWithErrors.mjs.map +1 -0
- package/dist/esm/internals/v6.d.ts +100 -0
- package/dist/esm/internals/v6.mjs +152 -0
- package/dist/esm/internals/v6.mjs.map +1 -0
- package/dist/esm/server/generateClient.d.ts +21 -0
- package/dist/esm/server/generateClient.mjs +41 -0
- package/dist/esm/server/generateClient.mjs.map +1 -0
- package/dist/esm/server/index.d.ts +1 -0
- package/dist/esm/server/index.mjs +2 -0
- package/dist/esm/server/index.mjs.map +1 -0
- package/dist/esm/types/PubSub.d.ts +27 -0
- package/dist/esm/types/PubSub.mjs +47 -0
- package/dist/esm/types/PubSub.mjs.map +1 -0
- package/dist/esm/types/index.d.ts +369 -0
- package/dist/esm/types/index.mjs +30 -0
- package/dist/esm/types/index.mjs.map +1 -0
- package/dist/esm/utils/ConnectionStateMonitor.d.ts +69 -0
- package/dist/esm/utils/ConnectionStateMonitor.mjs +132 -0
- package/dist/esm/utils/ConnectionStateMonitor.mjs.map +1 -0
- package/dist/esm/utils/ReachabilityMonitor/index.d.ts +1 -0
- package/dist/esm/utils/ReachabilityMonitor/index.mjs +8 -0
- package/dist/esm/utils/ReachabilityMonitor/index.mjs.map +1 -0
- package/dist/esm/utils/ReachabilityMonitor/index.native.d.ts +1 -0
- package/dist/esm/utils/ReachabilityMonitor/index.native.mjs +9 -0
- package/dist/esm/utils/ReachabilityMonitor/index.native.mjs.map +1 -0
- package/dist/esm/utils/ReconnectionMonitor.d.ts +29 -0
- package/dist/esm/utils/ReconnectionMonitor.mjs +69 -0
- package/dist/esm/utils/ReconnectionMonitor.mjs.map +1 -0
- package/dist/esm/utils/errors/GraphQLApiError.d.ts +7 -0
- package/dist/esm/utils/errors/GraphQLApiError.mjs +19 -0
- package/dist/esm/utils/errors/GraphQLApiError.mjs.map +1 -0
- package/dist/esm/utils/errors/assertValidationError.d.ts +5 -0
- package/dist/esm/utils/errors/assertValidationError.mjs +17 -0
- package/dist/esm/utils/errors/assertValidationError.mjs.map +1 -0
- package/dist/esm/utils/errors/constants.d.ts +7 -0
- package/dist/esm/utils/errors/constants.mjs +46 -0
- package/dist/esm/utils/errors/constants.mjs.map +1 -0
- package/dist/esm/utils/errors/createGraphQLResultWithError.d.ts +2 -0
- package/dist/esm/utils/errors/createGraphQLResultWithError.mjs +13 -0
- package/dist/esm/utils/errors/createGraphQLResultWithError.mjs.map +1 -0
- package/dist/esm/utils/errors/index.d.ts +4 -0
- package/dist/esm/utils/errors/index.mjs +5 -0
- package/dist/esm/utils/errors/index.mjs.map +1 -0
- package/dist/esm/utils/errors/repackageAuthError.d.ts +7 -0
- package/dist/esm/utils/errors/repackageAuthError.mjs +36 -0
- package/dist/esm/utils/errors/repackageAuthError.mjs.map +1 -0
- package/dist/esm/utils/errors/validation.d.ts +7 -0
- package/dist/esm/utils/errors/validation.mjs +26 -0
- package/dist/esm/utils/errors/validation.mjs.map +1 -0
- package/dist/esm/utils/index.d.ts +2 -0
- package/dist/esm/utils/index.mjs +3 -0
- package/dist/esm/utils/index.mjs.map +1 -0
- package/dist/esm/utils/resolveConfig.d.ts +12 -0
- package/dist/esm/utils/resolveConfig.mjs +33 -0
- package/dist/esm/utils/resolveConfig.mjs.map +1 -0
- package/dist/esm/utils/resolveLibraryOptions.d.ts +11 -0
- package/dist/esm/utils/resolveLibraryOptions.mjs +13 -0
- package/dist/esm/utils/resolveLibraryOptions.mjs.map +1 -0
- package/internals/package.json +8 -0
- package/internals/server/package.json +8 -0
- package/package.json +99 -0
- package/server/package.json +7 -0
- package/src/GraphQLAPI.ts +97 -0
- package/src/Providers/AWSAppSyncEventsProvider/index.ts +218 -0
- package/src/Providers/AWSAppSyncRealTimeProvider/index.ts +185 -0
- package/src/Providers/AWSWebSocketProvider/appsyncUrl.ts +152 -0
- package/src/Providers/AWSWebSocketProvider/authHeaders.ts +146 -0
- package/src/Providers/AWSWebSocketProvider/index.ts +1028 -0
- package/src/Providers/constants.ts +154 -0
- package/src/index.ts +12 -0
- package/src/internals/InternalGraphQLAPI.ts +424 -0
- package/src/internals/events/appsyncRequest.ts +169 -0
- package/src/internals/events/index.ts +199 -0
- package/src/internals/events/types.ts +109 -0
- package/src/internals/events/utils.ts +77 -0
- package/src/internals/generateClient.ts +120 -0
- package/src/internals/graphqlAuth.ts +87 -0
- package/src/internals/graphqlRequest.ts +30 -0
- package/src/internals/index.ts +10 -0
- package/src/internals/server/generateClientWithAmplifyInstance.ts +73 -0
- package/src/internals/server/index.ts +4 -0
- package/src/internals/types.ts +42 -0
- package/src/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.ts +10 -0
- package/src/internals/utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.ts +13 -0
- package/src/internals/utils/runtimeTypeGuards/isGraphQLResponseWithErrors.ts +15 -0
- package/src/internals/v6.ts +189 -0
- package/src/server/generateClient.ts +68 -0
- package/src/server/index.ts +4 -0
- package/src/types/PubSub.ts +57 -0
- package/src/types/index.ts +524 -0
- package/src/utils/ConnectionStateMonitor.ts +195 -0
- package/src/utils/ReachabilityMonitor/index.native.ts +7 -0
- package/src/utils/ReachabilityMonitor/index.ts +5 -0
- package/src/utils/ReconnectionMonitor.ts +77 -0
- package/src/utils/errors/GraphQLApiError.ts +21 -0
- package/src/utils/errors/assertValidationError.ts +19 -0
- package/src/utils/errors/constants.ts +56 -0
- package/src/utils/errors/createGraphQLResultWithError.ts +15 -0
- package/src/utils/errors/index.ts +7 -0
- package/src/utils/errors/repackageAuthError.ts +43 -0
- package/src/utils/errors/validation.ts +26 -0
- package/src/utils/index.ts +5 -0
- package/src/utils/resolveConfig.ts +46 -0
- package/src/utils/resolveLibraryOptions.ts +14 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Observer } from 'rxjs';
|
|
2
|
+
export declare enum ReconnectEvent {
|
|
3
|
+
START_RECONNECT = "START_RECONNECT",
|
|
4
|
+
HALT_RECONNECT = "HALT_RECONNECT"
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Captures the reconnect event logic used to determine when to reconnect to PubSub providers.
|
|
8
|
+
* Reconnect attempts are delayed by 5 seconds to let the interface settle.
|
|
9
|
+
* Attempting to reconnect only once creates unrecoverable states when the network state isn't
|
|
10
|
+
* supported by the browser, so this keeps retrying every minute until halted.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ReconnectionMonitor {
|
|
13
|
+
private reconnectObservers;
|
|
14
|
+
private reconnectIntervalId?;
|
|
15
|
+
private reconnectSetTimeoutId?;
|
|
16
|
+
/**
|
|
17
|
+
* Add reconnect observer to the list of observers to alert on reconnect
|
|
18
|
+
*/
|
|
19
|
+
addObserver(reconnectObserver: Observer<void>): void;
|
|
20
|
+
/**
|
|
21
|
+
* Given a reconnect event, start the appropriate behavior
|
|
22
|
+
*/
|
|
23
|
+
record(event: ReconnectEvent): void;
|
|
24
|
+
/**
|
|
25
|
+
* Complete all reconnect observers
|
|
26
|
+
*/
|
|
27
|
+
close(): void;
|
|
28
|
+
private _triggerReconnect;
|
|
29
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { RECONNECT_INTERVAL, RECONNECT_DELAY } from '../Providers/constants.mjs';
|
|
2
|
+
|
|
3
|
+
var ReconnectEvent;
|
|
4
|
+
(function (ReconnectEvent) {
|
|
5
|
+
ReconnectEvent["START_RECONNECT"] = "START_RECONNECT";
|
|
6
|
+
ReconnectEvent["HALT_RECONNECT"] = "HALT_RECONNECT";
|
|
7
|
+
})(ReconnectEvent || (ReconnectEvent = {}));
|
|
8
|
+
/**
|
|
9
|
+
* Captures the reconnect event logic used to determine when to reconnect to PubSub providers.
|
|
10
|
+
* Reconnect attempts are delayed by 5 seconds to let the interface settle.
|
|
11
|
+
* Attempting to reconnect only once creates unrecoverable states when the network state isn't
|
|
12
|
+
* supported by the browser, so this keeps retrying every minute until halted.
|
|
13
|
+
*/
|
|
14
|
+
class ReconnectionMonitor {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.reconnectObservers = [];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Add reconnect observer to the list of observers to alert on reconnect
|
|
20
|
+
*/
|
|
21
|
+
addObserver(reconnectObserver) {
|
|
22
|
+
this.reconnectObservers.push(reconnectObserver);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Given a reconnect event, start the appropriate behavior
|
|
26
|
+
*/
|
|
27
|
+
record(event) {
|
|
28
|
+
if (event === ReconnectEvent.START_RECONNECT) {
|
|
29
|
+
// If the reconnection hasn't been started
|
|
30
|
+
if (this.reconnectSetTimeoutId === undefined &&
|
|
31
|
+
this.reconnectIntervalId === undefined) {
|
|
32
|
+
this.reconnectSetTimeoutId = setTimeout(() => {
|
|
33
|
+
// Reconnect now
|
|
34
|
+
this._triggerReconnect();
|
|
35
|
+
// Retry reconnect every periodically until it works
|
|
36
|
+
this.reconnectIntervalId = setInterval(() => {
|
|
37
|
+
this._triggerReconnect();
|
|
38
|
+
}, RECONNECT_INTERVAL);
|
|
39
|
+
}, RECONNECT_DELAY);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (event === ReconnectEvent.HALT_RECONNECT) {
|
|
43
|
+
if (this.reconnectIntervalId) {
|
|
44
|
+
clearInterval(this.reconnectIntervalId);
|
|
45
|
+
this.reconnectIntervalId = undefined;
|
|
46
|
+
}
|
|
47
|
+
if (this.reconnectSetTimeoutId) {
|
|
48
|
+
clearTimeout(this.reconnectSetTimeoutId);
|
|
49
|
+
this.reconnectSetTimeoutId = undefined;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Complete all reconnect observers
|
|
55
|
+
*/
|
|
56
|
+
close() {
|
|
57
|
+
this.reconnectObservers.forEach(reconnectObserver => {
|
|
58
|
+
reconnectObserver.complete?.();
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
_triggerReconnect() {
|
|
62
|
+
this.reconnectObservers.forEach(reconnectObserver => {
|
|
63
|
+
reconnectObserver.next?.();
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { ReconnectEvent, ReconnectionMonitor };
|
|
69
|
+
//# sourceMappingURL=ReconnectionMonitor.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReconnectionMonitor.mjs","sources":["../../../src/utils/ReconnectionMonitor.ts"],"sourcesContent":["import { RECONNECT_DELAY, RECONNECT_INTERVAL } from '../Providers/constants';\nexport var ReconnectEvent;\n(function (ReconnectEvent) {\n ReconnectEvent[\"START_RECONNECT\"] = \"START_RECONNECT\";\n ReconnectEvent[\"HALT_RECONNECT\"] = \"HALT_RECONNECT\";\n})(ReconnectEvent || (ReconnectEvent = {}));\n/**\n * Captures the reconnect event logic used to determine when to reconnect to PubSub providers.\n * Reconnect attempts are delayed by 5 seconds to let the interface settle.\n * Attempting to reconnect only once creates unrecoverable states when the network state isn't\n * supported by the browser, so this keeps retrying every minute until halted.\n */\nexport class ReconnectionMonitor {\n constructor() {\n this.reconnectObservers = [];\n }\n /**\n * Add reconnect observer to the list of observers to alert on reconnect\n */\n addObserver(reconnectObserver) {\n this.reconnectObservers.push(reconnectObserver);\n }\n /**\n * Given a reconnect event, start the appropriate behavior\n */\n record(event) {\n if (event === ReconnectEvent.START_RECONNECT) {\n // If the reconnection hasn't been started\n if (this.reconnectSetTimeoutId === undefined &&\n this.reconnectIntervalId === undefined) {\n this.reconnectSetTimeoutId = setTimeout(() => {\n // Reconnect now\n this._triggerReconnect();\n // Retry reconnect every periodically until it works\n this.reconnectIntervalId = setInterval(() => {\n this._triggerReconnect();\n }, RECONNECT_INTERVAL);\n }, RECONNECT_DELAY);\n }\n }\n if (event === ReconnectEvent.HALT_RECONNECT) {\n if (this.reconnectIntervalId) {\n clearInterval(this.reconnectIntervalId);\n this.reconnectIntervalId = undefined;\n }\n if (this.reconnectSetTimeoutId) {\n clearTimeout(this.reconnectSetTimeoutId);\n this.reconnectSetTimeoutId = undefined;\n }\n }\n }\n /**\n * Complete all reconnect observers\n */\n close() {\n this.reconnectObservers.forEach(reconnectObserver => {\n reconnectObserver.complete?.();\n });\n }\n _triggerReconnect() {\n this.reconnectObservers.forEach(reconnectObserver => {\n reconnectObserver.next?.();\n });\n }\n}\n"],"names":[],"mappings":";;AACU,IAAC;AACX,CAAC,UAAU,cAAc,EAAE;AAC3B,IAAI,cAAc,CAAC,iBAAiB,CAAC,GAAG,iBAAiB;AACzD,IAAI,cAAc,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;AACvD,CAAC,EAAE,cAAc,KAAK,cAAc,GAAG,EAAE,CAAC,CAAC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,mBAAmB,CAAC;AACjC,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,kBAAkB,GAAG,EAAE;AACpC,IAAI;AACJ;AACA;AACA;AACA,IAAI,WAAW,CAAC,iBAAiB,EAAE;AACnC,QAAQ,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,iBAAiB,CAAC;AACvD,IAAI;AACJ;AACA;AACA;AACA,IAAI,MAAM,CAAC,KAAK,EAAE;AAClB,QAAQ,IAAI,KAAK,KAAK,cAAc,CAAC,eAAe,EAAE;AACtD;AACA,YAAY,IAAI,IAAI,CAAC,qBAAqB,KAAK,SAAS;AACxD,gBAAgB,IAAI,CAAC,mBAAmB,KAAK,SAAS,EAAE;AACxD,gBAAgB,IAAI,CAAC,qBAAqB,GAAG,UAAU,CAAC,MAAM;AAC9D;AACA,oBAAoB,IAAI,CAAC,iBAAiB,EAAE;AAC5C;AACA,oBAAoB,IAAI,CAAC,mBAAmB,GAAG,WAAW,CAAC,MAAM;AACjE,wBAAwB,IAAI,CAAC,iBAAiB,EAAE;AAChD,oBAAoB,CAAC,EAAE,kBAAkB,CAAC;AAC1C,gBAAgB,CAAC,EAAE,eAAe,CAAC;AACnC,YAAY;AACZ,QAAQ;AACR,QAAQ,IAAI,KAAK,KAAK,cAAc,CAAC,cAAc,EAAE;AACrD,YAAY,IAAI,IAAI,CAAC,mBAAmB,EAAE;AAC1C,gBAAgB,aAAa,CAAC,IAAI,CAAC,mBAAmB,CAAC;AACvD,gBAAgB,IAAI,CAAC,mBAAmB,GAAG,SAAS;AACpD,YAAY;AACZ,YAAY,IAAI,IAAI,CAAC,qBAAqB,EAAE;AAC5C,gBAAgB,YAAY,CAAC,IAAI,CAAC,qBAAqB,CAAC;AACxD,gBAAgB,IAAI,CAAC,qBAAqB,GAAG,SAAS;AACtD,YAAY;AACZ,QAAQ;AACR,IAAI;AACJ;AACA;AACA;AACA,IAAI,KAAK,GAAG;AACZ,QAAQ,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,iBAAiB,IAAI;AAC7D,YAAY,iBAAiB,CAAC,QAAQ,IAAI;AAC1C,QAAQ,CAAC,CAAC;AACV,IAAI;AACJ,IAAI,iBAAiB,GAAG;AACxB,QAAQ,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,iBAAiB,IAAI;AAC7D,YAAY,iBAAiB,CAAC,IAAI,IAAI;AACtC,QAAQ,CAAC,CAAC;AACV,IAAI;AACJ;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AmplifyError } from '@aws-amplify/core/internals/utils';
|
|
2
|
+
|
|
3
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
class GraphQLApiError extends AmplifyError {
|
|
9
|
+
constructor(params) {
|
|
10
|
+
super(params);
|
|
11
|
+
// Hack for making the custom error class work when transpiled to es5
|
|
12
|
+
// TODO: Delete the following 2 lines after we change the build target to >= es2015
|
|
13
|
+
this.constructor = GraphQLApiError;
|
|
14
|
+
Object.setPrototypeOf(this, GraphQLApiError.prototype);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { GraphQLApiError };
|
|
19
|
+
//# sourceMappingURL=GraphQLApiError.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphQLApiError.mjs","sources":["../../../../src/utils/errors/GraphQLApiError.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyError, } from '@aws-amplify/core/internals/utils';\n/**\n * @internal\n */\nexport class GraphQLApiError extends AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = GraphQLApiError;\n Object.setPrototypeOf(this, GraphQLApiError.prototype);\n }\n}\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACO,MAAM,eAAe,SAAS,YAAY,CAAC;AAClD,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,CAAC,MAAM,CAAC;AACrB;AACA;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,eAAe;AAC1C,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC;AAC9D,IAAI;AACJ;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GraphQLApiError } from './GraphQLApiError.mjs';
|
|
2
|
+
import { validationErrorMap } from './validation.mjs';
|
|
3
|
+
|
|
4
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
5
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
function assertValidationError(assertion, name) {
|
|
10
|
+
const { message, recoverySuggestion } = validationErrorMap[name];
|
|
11
|
+
if (!assertion) {
|
|
12
|
+
throw new GraphQLApiError({ name, message, recoverySuggestion });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { assertValidationError };
|
|
17
|
+
//# sourceMappingURL=assertValidationError.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertValidationError.mjs","sources":["../../../../src/utils/errors/assertValidationError.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { GraphQLApiError } from './GraphQLApiError';\nimport { validationErrorMap } from './validation';\n/**\n * @internal\n */\nexport function assertValidationError(assertion, name) {\n const { message, recoverySuggestion } = validationErrorMap[name];\n if (!assertion) {\n throw new GraphQLApiError({ name, message, recoverySuggestion });\n }\n}\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACO,SAAS,qBAAqB,CAAC,SAAS,EAAE,IAAI,EAAE;AACvD,IAAI,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,kBAAkB,CAAC,IAAI,CAAC;AACpE,IAAI,IAAI,CAAC,SAAS,EAAE;AACpB,QAAQ,MAAM,IAAI,eAAe,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AACxE,IAAI;AACJ;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AmplifyErrorParams } from '@aws-amplify/core/internals/utils';
|
|
2
|
+
export declare const NO_API_KEY: AmplifyErrorParams;
|
|
3
|
+
export declare const NO_VALID_CREDENTIALS: AmplifyErrorParams;
|
|
4
|
+
export declare const NO_VALID_AUTH_TOKEN: AmplifyErrorParams;
|
|
5
|
+
export declare const NO_SIGNED_IN_USER: AmplifyErrorParams;
|
|
6
|
+
export declare const NO_AUTH_TOKEN_HEADER: AmplifyErrorParams;
|
|
7
|
+
export declare const NO_ENDPOINT: AmplifyErrorParams;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { GraphQLAuthError } from '../../types/index.mjs';
|
|
2
|
+
|
|
3
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
const NO_API_KEY = {
|
|
6
|
+
name: 'NoApiKey',
|
|
7
|
+
// ideal: No API key configured.
|
|
8
|
+
message: GraphQLAuthError.NO_API_KEY,
|
|
9
|
+
recoverySuggestion: 'The API request was made with `authMode: "apiKey"` but no API Key was passed into `Amplify.configure()`. Review if your API key is passed into the `Amplify.configure()` function.',
|
|
10
|
+
};
|
|
11
|
+
const NO_VALID_CREDENTIALS = {
|
|
12
|
+
name: 'NoCredentials',
|
|
13
|
+
// ideal: No auth credentials available.
|
|
14
|
+
message: GraphQLAuthError.NO_CREDENTIALS,
|
|
15
|
+
recoverySuggestion: `The API request was made with \`authMode: "iam"\` but no authentication credentials are available.
|
|
16
|
+
|
|
17
|
+
If you intended to make a request using an authenticated role, review if your user is signed in before making the request.
|
|
18
|
+
|
|
19
|
+
If you intend to make a request using an unauthenticated role or also known as "guest access", verify if "Auth.Cognito.allowGuestAccess" is set to "true" in the \`Amplify.configure()\` function.`,
|
|
20
|
+
};
|
|
21
|
+
const NO_VALID_AUTH_TOKEN = {
|
|
22
|
+
name: 'NoValidAuthTokens',
|
|
23
|
+
// ideal: No valid JWT auth token provided to make the API request..
|
|
24
|
+
message: GraphQLAuthError.NO_FEDERATED_JWT,
|
|
25
|
+
recoverySuggestion: 'If you intended to make an authenticated API request, review if the current user is signed in.',
|
|
26
|
+
};
|
|
27
|
+
const NO_SIGNED_IN_USER = {
|
|
28
|
+
name: 'NoSignedUser',
|
|
29
|
+
// ideal: Couldn't retrieve authentication credentials to make the API request.
|
|
30
|
+
message: GraphQLAuthError.NO_CURRENT_USER,
|
|
31
|
+
recoverySuggestion: 'Review the underlying exception field for more details. If you intended to make an authenticated API request, review if the current user is signed in.',
|
|
32
|
+
};
|
|
33
|
+
const NO_AUTH_TOKEN_HEADER = {
|
|
34
|
+
name: 'NoAuthorizationHeader',
|
|
35
|
+
// ideal: Authorization header not specified.
|
|
36
|
+
message: GraphQLAuthError.NO_AUTH_TOKEN,
|
|
37
|
+
recoverySuggestion: 'The API request was made with `authMode: "lambda"` but no `authToken` is set. Review if a valid authToken is passed into the request options or in the `Amplify.configure()` function.',
|
|
38
|
+
};
|
|
39
|
+
const NO_ENDPOINT = {
|
|
40
|
+
name: 'NoEndpoint',
|
|
41
|
+
message: 'No GraphQL endpoint configured in `Amplify.configure()`.',
|
|
42
|
+
recoverySuggestion: 'Review if the GraphQL API endpoint is set in the `Amplify.configure()` function.',
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { NO_API_KEY, NO_AUTH_TOKEN_HEADER, NO_ENDPOINT, NO_SIGNED_IN_USER, NO_VALID_AUTH_TOKEN, NO_VALID_CREDENTIALS };
|
|
46
|
+
//# sourceMappingURL=constants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.mjs","sources":["../../../../src/utils/errors/constants.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { GraphQLAuthError } from '../../types';\nexport const NO_API_KEY = {\n name: 'NoApiKey',\n // ideal: No API key configured.\n message: GraphQLAuthError.NO_API_KEY,\n recoverySuggestion: 'The API request was made with `authMode: \"apiKey\"` but no API Key was passed into `Amplify.configure()`. Review if your API key is passed into the `Amplify.configure()` function.',\n};\nexport const NO_VALID_CREDENTIALS = {\n name: 'NoCredentials',\n // ideal: No auth credentials available.\n message: GraphQLAuthError.NO_CREDENTIALS,\n recoverySuggestion: `The API request was made with \\`authMode: \"iam\"\\` but no authentication credentials are available.\n\nIf you intended to make a request using an authenticated role, review if your user is signed in before making the request.\n\nIf you intend to make a request using an unauthenticated role or also known as \"guest access\", verify if \"Auth.Cognito.allowGuestAccess\" is set to \"true\" in the \\`Amplify.configure()\\` function.`,\n};\nexport const NO_VALID_AUTH_TOKEN = {\n name: 'NoValidAuthTokens',\n // ideal: No valid JWT auth token provided to make the API request..\n message: GraphQLAuthError.NO_FEDERATED_JWT,\n recoverySuggestion: 'If you intended to make an authenticated API request, review if the current user is signed in.',\n};\nexport const NO_SIGNED_IN_USER = {\n name: 'NoSignedUser',\n // ideal: Couldn't retrieve authentication credentials to make the API request.\n message: GraphQLAuthError.NO_CURRENT_USER,\n recoverySuggestion: 'Review the underlying exception field for more details. If you intended to make an authenticated API request, review if the current user is signed in.',\n};\nexport const NO_AUTH_TOKEN_HEADER = {\n name: 'NoAuthorizationHeader',\n // ideal: Authorization header not specified.\n message: GraphQLAuthError.NO_AUTH_TOKEN,\n recoverySuggestion: 'The API request was made with `authMode: \"lambda\"` but no `authToken` is set. Review if a valid authToken is passed into the request options or in the `Amplify.configure()` function.',\n};\nexport const NO_ENDPOINT = {\n name: 'NoEndpoint',\n message: 'No GraphQL endpoint configured in `Amplify.configure()`.',\n recoverySuggestion: 'Review if the GraphQL API endpoint is set in the `Amplify.configure()` function.',\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEY,MAAC,UAAU,GAAG;AAC1B,IAAI,IAAI,EAAE,UAAU;AACpB;AACA,IAAI,OAAO,EAAE,gBAAgB,CAAC,UAAU;AACxC,IAAI,kBAAkB,EAAE,oLAAoL;AAC5M;AACY,MAAC,oBAAoB,GAAG;AACpC,IAAI,IAAI,EAAE,eAAe;AACzB;AACA,IAAI,OAAO,EAAE,gBAAgB,CAAC,cAAc;AAC5C,IAAI,kBAAkB,EAAE,CAAC;;AAEzB;;AAEA,kMAAkM,CAAC;AACnM;AACY,MAAC,mBAAmB,GAAG;AACnC,IAAI,IAAI,EAAE,mBAAmB;AAC7B;AACA,IAAI,OAAO,EAAE,gBAAgB,CAAC,gBAAgB;AAC9C,IAAI,kBAAkB,EAAE,gGAAgG;AACxH;AACY,MAAC,iBAAiB,GAAG;AACjC,IAAI,IAAI,EAAE,cAAc;AACxB;AACA,IAAI,OAAO,EAAE,gBAAgB,CAAC,eAAe;AAC7C,IAAI,kBAAkB,EAAE,wJAAwJ;AAChL;AACY,MAAC,oBAAoB,GAAG;AACpC,IAAI,IAAI,EAAE,uBAAuB;AACjC;AACA,IAAI,OAAO,EAAE,gBAAgB,CAAC,aAAa;AAC3C,IAAI,kBAAkB,EAAE,wLAAwL;AAChN;AACY,MAAC,WAAW,GAAG;AAC3B,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,OAAO,EAAE,0DAA0D;AACvE,IAAI,kBAAkB,EAAE,kFAAkF;AAC1G;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GraphQLError } from 'graphql';
|
|
2
|
+
|
|
3
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
const createGraphQLResultWithError = (error) => {
|
|
6
|
+
return {
|
|
7
|
+
data: {},
|
|
8
|
+
errors: [new GraphQLError(error.message, null, null, null, null, error)],
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { createGraphQLResultWithError };
|
|
13
|
+
//# sourceMappingURL=createGraphQLResultWithError.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createGraphQLResultWithError.mjs","sources":["../../../../src/utils/errors/createGraphQLResultWithError.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { GraphQLError } from 'graphql';\nexport const createGraphQLResultWithError = (error) => {\n return {\n data: {},\n errors: [new GraphQLError(error.message, null, null, null, null, error)],\n };\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEY,MAAC,4BAA4B,GAAG,CAAC,KAAK,KAAK;AACvD,IAAI,OAAO;AACX,QAAQ,IAAI,EAAE,EAAE;AAChB,QAAQ,MAAM,EAAE,CAAC,IAAI,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AAChF,KAAK;AACL;;;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { GraphQLApiError } from './GraphQLApiError';
|
|
2
|
+
export { assertValidationError } from './assertValidationError';
|
|
3
|
+
export { APIValidationErrorCode, validationErrorMap } from './validation';
|
|
4
|
+
export { createGraphQLResultWithError } from './createGraphQLResultWithError';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { GraphQLApiError } from './GraphQLApiError.mjs';
|
|
2
|
+
export { assertValidationError } from './assertValidationError.mjs';
|
|
3
|
+
export { APIValidationErrorCode, validationErrorMap } from './validation.mjs';
|
|
4
|
+
export { createGraphQLResultWithError } from './createGraphQLResultWithError.mjs';
|
|
5
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GraphQLResult } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Checks to see if the given response or subscription message contains an
|
|
4
|
+
* Unauthorized error. If it does, it changes the error message to include instructions
|
|
5
|
+
* for the app developer.
|
|
6
|
+
*/
|
|
7
|
+
export declare function repackageUnauthorizedError<T extends GraphQLResult<any>>(content: T): T;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
/**
|
|
4
|
+
* Checks to see if the given response or subscription message contains an
|
|
5
|
+
* Unauthorized error. If it does, it changes the error message to include instructions
|
|
6
|
+
* for the app developer.
|
|
7
|
+
*/
|
|
8
|
+
function repackageUnauthorizedError(content) {
|
|
9
|
+
if (content.errors && Array.isArray(content.errors)) {
|
|
10
|
+
content.errors.forEach(e => {
|
|
11
|
+
if (isUnauthorizedError(e)) {
|
|
12
|
+
e.message = 'Unauthorized';
|
|
13
|
+
e.recoverySuggestion =
|
|
14
|
+
`If you're calling an Amplify-generated API, make sure ` +
|
|
15
|
+
`to set the "authMode" in generateClient({ authMode: '...' }) to the backend authorization ` +
|
|
16
|
+
`rule's auth provider ('apiKey', 'userPool', 'iam', 'oidc', 'lambda')`;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return content;
|
|
21
|
+
}
|
|
22
|
+
function isUnauthorizedError(error) {
|
|
23
|
+
// Error pattern corresponding to appsync calls
|
|
24
|
+
if (error?.originalError?.name?.startsWith('UnauthorizedException')) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
// Error pattern corresponding to appsync subscriptions
|
|
28
|
+
if (error.message?.startsWith('Connection failed:') &&
|
|
29
|
+
error.message?.includes('Permission denied')) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { repackageUnauthorizedError };
|
|
36
|
+
//# sourceMappingURL=repackageAuthError.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repackageAuthError.mjs","sources":["../../../../src/utils/errors/repackageAuthError.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Checks to see if the given response or subscription message contains an\n * Unauthorized error. If it does, it changes the error message to include instructions\n * for the app developer.\n */\nexport function repackageUnauthorizedError(content) {\n if (content.errors && Array.isArray(content.errors)) {\n content.errors.forEach(e => {\n if (isUnauthorizedError(e)) {\n e.message = 'Unauthorized';\n e.recoverySuggestion =\n `If you're calling an Amplify-generated API, make sure ` +\n `to set the \"authMode\" in generateClient({ authMode: '...' }) to the backend authorization ` +\n `rule's auth provider ('apiKey', 'userPool', 'iam', 'oidc', 'lambda')`;\n }\n });\n }\n return content;\n}\nfunction isUnauthorizedError(error) {\n // Error pattern corresponding to appsync calls\n if (error?.originalError?.name?.startsWith('UnauthorizedException')) {\n return true;\n }\n // Error pattern corresponding to appsync subscriptions\n if (error.message?.startsWith('Connection failed:') &&\n error.message?.includes('Permission denied')) {\n return true;\n }\n return false;\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,0BAA0B,CAAC,OAAO,EAAE;AACpD,IAAI,IAAI,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;AACzD,QAAQ,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI;AACpC,YAAY,IAAI,mBAAmB,CAAC,CAAC,CAAC,EAAE;AACxC,gBAAgB,CAAC,CAAC,OAAO,GAAG,cAAc;AAC1C,gBAAgB,CAAC,CAAC,kBAAkB;AACpC,oBAAoB,CAAC,sDAAsD,CAAC;AAC5E,wBAAwB,CAAC,0FAA0F,CAAC;AACpH,wBAAwB,CAAC,oEAAoE,CAAC;AAC9F,YAAY;AACZ,QAAQ,CAAC,CAAC;AACV,IAAI;AACJ,IAAI,OAAO,OAAO;AAClB;AACA,SAAS,mBAAmB,CAAC,KAAK,EAAE;AACpC;AACA,IAAI,IAAI,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,CAAC,uBAAuB,CAAC,EAAE;AACzE,QAAQ,OAAO,IAAI;AACnB,IAAI;AACJ;AACA,IAAI,IAAI,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,oBAAoB,CAAC;AACvD,QAAQ,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,mBAAmB,CAAC,EAAE;AACtD,QAAQ,OAAO,IAAI;AACnB,IAAI;AACJ,IAAI,OAAO,KAAK;AAChB;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AmplifyErrorMap } from '@aws-amplify/core/internals/utils';
|
|
2
|
+
export declare enum APIValidationErrorCode {
|
|
3
|
+
NoAuthSession = "NoAuthSession",
|
|
4
|
+
NoRegion = "NoRegion",
|
|
5
|
+
NoCustomEndpoint = "NoCustomEndpoint"
|
|
6
|
+
}
|
|
7
|
+
export declare const validationErrorMap: AmplifyErrorMap<APIValidationErrorCode>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
var APIValidationErrorCode;
|
|
4
|
+
(function (APIValidationErrorCode) {
|
|
5
|
+
APIValidationErrorCode["NoAuthSession"] = "NoAuthSession";
|
|
6
|
+
APIValidationErrorCode["NoRegion"] = "NoRegion";
|
|
7
|
+
APIValidationErrorCode["NoCustomEndpoint"] = "NoCustomEndpoint";
|
|
8
|
+
})(APIValidationErrorCode || (APIValidationErrorCode = {}));
|
|
9
|
+
const validationErrorMap = {
|
|
10
|
+
[APIValidationErrorCode.NoAuthSession]: {
|
|
11
|
+
message: 'Auth session should not be empty.',
|
|
12
|
+
},
|
|
13
|
+
// TODO: re-enable when working in all test environments:
|
|
14
|
+
// [APIValidationErrorCode.NoEndpoint]: {
|
|
15
|
+
// message: 'Missing endpoint',
|
|
16
|
+
// },
|
|
17
|
+
[APIValidationErrorCode.NoRegion]: {
|
|
18
|
+
message: 'Missing region.',
|
|
19
|
+
},
|
|
20
|
+
[APIValidationErrorCode.NoCustomEndpoint]: {
|
|
21
|
+
message: 'Custom endpoint region is present without custom endpoint.',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { APIValidationErrorCode, validationErrorMap };
|
|
26
|
+
//# sourceMappingURL=validation.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.mjs","sources":["../../../../src/utils/errors/validation.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport var APIValidationErrorCode;\n(function (APIValidationErrorCode) {\n APIValidationErrorCode[\"NoAuthSession\"] = \"NoAuthSession\";\n APIValidationErrorCode[\"NoRegion\"] = \"NoRegion\";\n APIValidationErrorCode[\"NoCustomEndpoint\"] = \"NoCustomEndpoint\";\n})(APIValidationErrorCode || (APIValidationErrorCode = {}));\nexport const validationErrorMap = {\n [APIValidationErrorCode.NoAuthSession]: {\n message: 'Auth session should not be empty.',\n },\n // TODO: re-enable when working in all test environments:\n // [APIValidationErrorCode.NoEndpoint]: {\n // \tmessage: 'Missing endpoint',\n // },\n [APIValidationErrorCode.NoRegion]: {\n message: 'Missing region.',\n },\n [APIValidationErrorCode.NoCustomEndpoint]: {\n message: 'Custom endpoint region is present without custom endpoint.',\n },\n};\n"],"names":[],"mappings":"AAAA;AACA;AACU,IAAC;AACX,CAAC,UAAU,sBAAsB,EAAE;AACnC,IAAI,sBAAsB,CAAC,eAAe,CAAC,GAAG,eAAe;AAC7D,IAAI,sBAAsB,CAAC,UAAU,CAAC,GAAG,UAAU;AACnD,IAAI,sBAAsB,CAAC,kBAAkB,CAAC,GAAG,kBAAkB;AACnE,CAAC,EAAE,sBAAsB,KAAK,sBAAsB,GAAG,EAAE,CAAC,CAAC;AAC/C,MAAC,kBAAkB,GAAG;AAClC,IAAI,CAAC,sBAAsB,CAAC,aAAa,GAAG;AAC5C,QAAQ,OAAO,EAAE,mCAAmC;AACpD,KAAK;AACL;AACA;AACA;AACA;AACA,IAAI,CAAC,sBAAsB,CAAC,QAAQ,GAAG;AACvC,QAAQ,OAAO,EAAE,iBAAiB;AAClC,KAAK;AACL,IAAI,CAAC,sBAAsB,CAAC,gBAAgB,GAAG;AAC/C,QAAQ,OAAO,EAAE,4DAA4D;AAC7E,KAAK;AACL;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AmplifyClassV6 } from '@aws-amplify/core';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const resolveConfig: (amplify: AmplifyClassV6) => {
|
|
6
|
+
apiKey: string | undefined;
|
|
7
|
+
customEndpoint: string | undefined;
|
|
8
|
+
customEndpointRegion: string | undefined;
|
|
9
|
+
defaultAuthMode: import("@aws-amplify/core/internals/utils").GraphQLAuthMode | undefined;
|
|
10
|
+
endpoint: string | undefined;
|
|
11
|
+
region: string | undefined;
|
|
12
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ConsoleLogger } from '@aws-amplify/core';
|
|
2
|
+
import '@aws-amplify/core/internals/utils';
|
|
3
|
+
import { assertValidationError } from './errors/assertValidationError.mjs';
|
|
4
|
+
import { APIValidationErrorCode } from './errors/validation.mjs';
|
|
5
|
+
import 'graphql';
|
|
6
|
+
|
|
7
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
8
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
9
|
+
const logger = new ConsoleLogger('GraphQLAPI resolveConfig');
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
const resolveConfig = (amplify) => {
|
|
14
|
+
const config = amplify.getConfig();
|
|
15
|
+
if (!config.API?.GraphQL) {
|
|
16
|
+
logger.warn('The API configuration is missing. This is likely due to Amplify.configure() not being called prior to generateClient().');
|
|
17
|
+
}
|
|
18
|
+
const { apiKey, customEndpoint, customEndpointRegion, defaultAuthMode, endpoint, region, } = config.API?.GraphQL ?? {};
|
|
19
|
+
// TODO: re-enable when working in all test environments:
|
|
20
|
+
// assertValidationError(!!endpoint, APIValidationErrorCode.NoEndpoint);
|
|
21
|
+
assertValidationError(!(!customEndpoint && customEndpointRegion), APIValidationErrorCode.NoCustomEndpoint);
|
|
22
|
+
return {
|
|
23
|
+
apiKey,
|
|
24
|
+
customEndpoint,
|
|
25
|
+
customEndpointRegion,
|
|
26
|
+
defaultAuthMode,
|
|
27
|
+
endpoint,
|
|
28
|
+
region,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { resolveConfig };
|
|
33
|
+
//# sourceMappingURL=resolveConfig.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveConfig.mjs","sources":["../../../src/utils/resolveConfig.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ConsoleLogger } from '@aws-amplify/core';\nimport { APIValidationErrorCode, assertValidationError } from './errors';\nconst logger = new ConsoleLogger('GraphQLAPI resolveConfig');\n/**\n * @internal\n */\nexport const resolveConfig = (amplify) => {\n const config = amplify.getConfig();\n if (!config.API?.GraphQL) {\n logger.warn('The API configuration is missing. This is likely due to Amplify.configure() not being called prior to generateClient().');\n }\n const { apiKey, customEndpoint, customEndpointRegion, defaultAuthMode, endpoint, region, } = config.API?.GraphQL ?? {};\n // TODO: re-enable when working in all test environments:\n // assertValidationError(!!endpoint, APIValidationErrorCode.NoEndpoint);\n assertValidationError(!(!customEndpoint && customEndpointRegion), APIValidationErrorCode.NoCustomEndpoint);\n return {\n apiKey,\n customEndpoint,\n customEndpointRegion,\n defaultAuthMode,\n endpoint,\n region,\n };\n};\n"],"names":[],"mappings":";;;;;;AAAA;AACA;AAGA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,0BAA0B,CAAC;AAC5D;AACA;AACA;AACY,MAAC,aAAa,GAAG,CAAC,OAAO,KAAK;AAC1C,IAAI,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE;AACtC,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE;AAC9B,QAAQ,MAAM,CAAC,IAAI,CAAC,yHAAyH,CAAC;AAC9I,IAAI;AACJ,IAAI,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,oBAAoB,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,EAAE,OAAO,IAAI,EAAE;AAC1H;AACA;AACA,IAAI,qBAAqB,CAAC,EAAE,CAAC,cAAc,IAAI,oBAAoB,CAAC,EAAE,sBAAsB,CAAC,gBAAgB,CAAC;AAC9G,IAAI,OAAO;AACX,QAAQ,MAAM;AACd,QAAQ,cAAc;AACtB,QAAQ,oBAAoB;AAC5B,QAAQ,eAAe;AACvB,QAAQ,QAAQ;AAChB,QAAQ,MAAM;AACd,KAAK;AACL;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AmplifyClassV6 } from '@aws-amplify/core';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const resolveLibraryOptions: (amplify: AmplifyClassV6) => {
|
|
6
|
+
headers: ((options?: {
|
|
7
|
+
query?: string;
|
|
8
|
+
variables?: Record<string, import("@aws-amplify/core/internals/utils").DocumentType>;
|
|
9
|
+
}) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Headers | Record<string, unknown>>) | undefined;
|
|
10
|
+
withCredentials: boolean | undefined;
|
|
11
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
const resolveLibraryOptions = (amplify) => {
|
|
7
|
+
const headers = amplify.libraryOptions?.API?.GraphQL?.headers;
|
|
8
|
+
const withCredentials = amplify.libraryOptions?.API?.GraphQL?.withCredentials;
|
|
9
|
+
return { headers, withCredentials };
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { resolveLibraryOptions };
|
|
13
|
+
//# sourceMappingURL=resolveLibraryOptions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveLibraryOptions.mjs","sources":["../../../src/utils/resolveLibraryOptions.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nexport const resolveLibraryOptions = (amplify) => {\n const headers = amplify.libraryOptions?.API?.GraphQL?.headers;\n const withCredentials = amplify.libraryOptions?.API?.GraphQL?.withCredentials;\n return { headers, withCredentials };\n};\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACY,MAAC,qBAAqB,GAAG,CAAC,OAAO,KAAK;AAClD,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,cAAc,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO;AACjE,IAAI,MAAM,eAAe,GAAG,OAAO,CAAC,cAAc,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe;AACjF,IAAI,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE;AACvC;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aws-amplify/api-graphql/internals",
|
|
3
|
+
"types": "../dist/esm/internals/index.d.ts",
|
|
4
|
+
"main": "../dist/cjs/internals/index.js",
|
|
5
|
+
"module": "../dist/esm/internals/index.mjs",
|
|
6
|
+
"react-native": "../dist/cjs/internals/index.js",
|
|
7
|
+
"sideEffects": false
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aws-amplify/api-graphql/internals/server",
|
|
3
|
+
"types": "../../dist/esm/internals/server/index.d.ts",
|
|
4
|
+
"main": "../../dist/cjs/internals/server/index.js",
|
|
5
|
+
"module": "../../dist/esm/internals/server/index.mjs",
|
|
6
|
+
"react-native": "../../dist/cjs/internals/server/index.js",
|
|
7
|
+
"sideEffects": false
|
|
8
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aws-amplify/api-graphql",
|
|
3
|
+
"version": "0.0.0-unstable-1ca644b-20260128091132",
|
|
4
|
+
"description": "Api-graphql category of aws-amplify",
|
|
5
|
+
"main": "./dist/cjs/index.js",
|
|
6
|
+
"module": "./dist/esm/index.mjs",
|
|
7
|
+
"typings": "./dist/esm/index.d.ts",
|
|
8
|
+
"react-native": "./dist/cjs/index.js",
|
|
9
|
+
"sideEffects": [
|
|
10
|
+
"./dist/cjs/GraphQLAPI.js",
|
|
11
|
+
"./dist/esm/GraphQLAPI.mjs"
|
|
12
|
+
],
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"test": "npm run lint && jest -w 1 --coverage --logHeapUsage",
|
|
18
|
+
"test:watch": "jest -w 1 --watch",
|
|
19
|
+
"build-with-test": "npm test && npm build",
|
|
20
|
+
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
|
|
21
|
+
"build:esm-cjs": "rollup --forceExit -c rollup.config.mjs",
|
|
22
|
+
"build:watch": "npm run build:esm-cjs -- --watch",
|
|
23
|
+
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
|
|
24
|
+
"clean": "npm run clean:size && rimraf dist lib lib-esm",
|
|
25
|
+
"clean:size": "rimraf dual-publish-tmp tmp*",
|
|
26
|
+
"format": "echo \"Not implemented\"",
|
|
27
|
+
"lint": "eslint '**/*.{ts,tsx}' && npm run ts-coverage",
|
|
28
|
+
"lint:fix": "eslint '**/*.{ts,tsx}' --fix",
|
|
29
|
+
"ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 70.0"
|
|
30
|
+
},
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"react-native": "./dist/cjs/index.js",
|
|
34
|
+
"types": "./dist/esm/index.d.ts",
|
|
35
|
+
"import": "./dist/esm/index.mjs",
|
|
36
|
+
"require": "./dist/cjs/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./internals": {
|
|
39
|
+
"react-native": "./dist/cjs/internals/index.js",
|
|
40
|
+
"types": "./dist/esm/internals/index.d.ts",
|
|
41
|
+
"import": "./dist/esm/internals/index.mjs",
|
|
42
|
+
"require": "./dist/cjs/internals/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./internals/server": {
|
|
45
|
+
"react-native": "./dist/cjs/internals/server/index.js",
|
|
46
|
+
"types": "./dist/esm/internals/server/index.d.ts",
|
|
47
|
+
"import": "./dist/esm/internals/server/index.mjs",
|
|
48
|
+
"require": "./dist/cjs/internals/server/index.js"
|
|
49
|
+
},
|
|
50
|
+
"./server": {
|
|
51
|
+
"types": "./dist/esm/server/index.d.ts",
|
|
52
|
+
"import": "./dist/esm/server/index.mjs",
|
|
53
|
+
"require": "./dist/cjs/server/index.js"
|
|
54
|
+
},
|
|
55
|
+
"./package.json": "./package.json"
|
|
56
|
+
},
|
|
57
|
+
"typesVersions": {
|
|
58
|
+
">=4.2": {
|
|
59
|
+
"internals": [
|
|
60
|
+
"./dist/esm/internals/index.d.ts"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"repository": {
|
|
65
|
+
"type": "git",
|
|
66
|
+
"url": "https://github.com/aws-amplify/amplify-js.git"
|
|
67
|
+
},
|
|
68
|
+
"author": "Amazon Web Services",
|
|
69
|
+
"license": "Apache-2.0",
|
|
70
|
+
"bugs": {
|
|
71
|
+
"url": "https://github.com/aws/aws-amplify/issues"
|
|
72
|
+
},
|
|
73
|
+
"homepage": "https://aws-amplify.github.io/",
|
|
74
|
+
"files": [
|
|
75
|
+
"dist/cjs",
|
|
76
|
+
"dist/esm",
|
|
77
|
+
"src",
|
|
78
|
+
"internals",
|
|
79
|
+
"server"
|
|
80
|
+
],
|
|
81
|
+
"dependencies": {
|
|
82
|
+
"@aws-amplify/api-rest": "0.0.0-unstable-1ca644b-20260128091132",
|
|
83
|
+
"@aws-amplify/core": "0.0.0-unstable-1ca644b-20260128091132",
|
|
84
|
+
"@aws-amplify/data-schema": "^1.7.0",
|
|
85
|
+
"@aws-sdk/types": "3.723.0",
|
|
86
|
+
"graphql": "15.8.0",
|
|
87
|
+
"rxjs": "^7.8.1",
|
|
88
|
+
"tslib": "^2.5.0",
|
|
89
|
+
"uuid": "^11.0.0"
|
|
90
|
+
},
|
|
91
|
+
"size-limit": [
|
|
92
|
+
{
|
|
93
|
+
"name": "API (GraphQL client)",
|
|
94
|
+
"path": "./dist/esm/index.mjs",
|
|
95
|
+
"import": "{ Amplify, GraphQLAPI }",
|
|
96
|
+
"limit": "91.7 kB"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|