@aws-amplify/api-graphql 4.0.1-console-preview.047a1dd.0 → 4.0.1-console-preview.4432977.0
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/lib/GraphQLAPI.d.ts +1 -1
- package/lib/Providers/AWSAppSyncRealTimeProvider/index.js +5 -5
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/lib/internals/InternalGraphQLAPI.d.ts +1 -1
- package/lib/internals/InternalGraphQLAPI.js +3 -3
- package/lib/tsconfig.tsbuildinfo +829 -827
- package/lib/types/index.d.ts +5 -4
- package/lib/types/index.js +3 -0
- package/lib-esm/GraphQLAPI.d.ts +1 -1
- package/lib-esm/Providers/AWSAppSyncRealTimeProvider/index.js +5 -5
- package/lib-esm/index.d.ts +1 -0
- package/lib-esm/index.js +1 -0
- package/lib-esm/internals/InternalGraphQLAPI.d.ts +1 -1
- package/lib-esm/internals/InternalGraphQLAPI.js +3 -3
- package/lib-esm/tsconfig.tsbuildinfo +829 -827
- package/lib-esm/types/index.d.ts +5 -4
- package/lib-esm/types/index.js +1 -0
- package/package.json +6 -5
- package/src/GraphQLAPI.ts +1 -1
- package/src/Providers/AWSAppSyncRealTimeProvider/index.ts +5 -5
- package/src/index.ts +2 -0
- package/src/internals/InternalGraphQLAPI.ts +4 -4
- package/src/types/index.ts +5 -6
package/lib/types/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Source, DocumentNode, GraphQLError } from 'graphql';
|
|
2
2
|
export { OperationTypeNode } from 'graphql';
|
|
3
|
-
import { Observable } from '
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
4
|
import { DocumentType } from '@aws-amplify/api-rest';
|
|
5
|
-
|
|
5
|
+
import { GraphQLAuthModeKeys } from '@aws-amplify/core/internals/utils';
|
|
6
|
+
export { CONTROL_MSG, ConnectionState } from './PubSub';
|
|
6
7
|
/**
|
|
7
8
|
* Loose/Unknown options for raw GraphQLAPICategory `graphql()`.
|
|
8
9
|
*/
|
|
@@ -72,7 +73,7 @@ export declare type GraphqlSubscriptionMessage<T> = {
|
|
|
72
73
|
};
|
|
73
74
|
export interface AWSAppSyncRealTimeProviderOptions {
|
|
74
75
|
appSyncGraphqlEndpoint?: string;
|
|
75
|
-
authenticationType?:
|
|
76
|
+
authenticationType?: GraphQLAuthModeKeys;
|
|
76
77
|
query?: string;
|
|
77
78
|
variables?: Record<string, unknown>;
|
|
78
79
|
apiKey?: string;
|
|
@@ -104,7 +105,7 @@ export declare type GraphQLOperation = Source | string;
|
|
|
104
105
|
export interface GraphQLOptionsV6<FALLBACK_TYPES = unknown, TYPED_GQL_STRING extends string = string> {
|
|
105
106
|
query: TYPED_GQL_STRING | DocumentNode;
|
|
106
107
|
variables?: GraphQLVariablesV6<FALLBACK_TYPES, TYPED_GQL_STRING>;
|
|
107
|
-
authMode?:
|
|
108
|
+
authMode?: GraphQLAuthModeKeys;
|
|
108
109
|
authToken?: string;
|
|
109
110
|
/**
|
|
110
111
|
* @deprecated This property should not be used
|
package/lib/types/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var PubSub_1 = require("./PubSub");
|
|
4
|
+
exports.CONTROL_MSG = PubSub_1.CONTROL_MSG;
|
|
5
|
+
exports.ConnectionState = PubSub_1.ConnectionState;
|
|
3
6
|
var GraphQLAuthError;
|
|
4
7
|
(function (GraphQLAuthError) {
|
|
5
8
|
GraphQLAuthError["NO_API_KEY"] = "No api-key configured";
|
package/lib-esm/GraphQLAPI.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GraphQLOptions, GraphQLResult } from './types';
|
|
2
2
|
import { InternalGraphQLAPIClass } from './internals';
|
|
3
|
-
import Observable from '
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
4
|
export declare const graphqlOperation: (query: any, variables?: {}, authToken?: string) => {
|
|
5
5
|
query: any;
|
|
6
6
|
variables: {};
|
|
@@ -395,11 +395,11 @@ var AWSAppSyncRealTimeProvider = /** @class */ (function () {
|
|
|
395
395
|
}
|
|
396
396
|
if (startAckTimeoutId)
|
|
397
397
|
clearTimeout(startAckTimeoutId);
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
398
|
+
dispatchApiEvent({
|
|
399
|
+
event: CONTROL_MSG.SUBSCRIPTION_ACK,
|
|
400
|
+
data: { query: query, variables: variables },
|
|
401
|
+
message: 'Connection established for subscription',
|
|
402
|
+
});
|
|
403
403
|
var subscriptionState = SUBSCRIPTION_STATUS.CONNECTED;
|
|
404
404
|
if (observer) {
|
|
405
405
|
this.subscriptionObserverMap.set(id, {
|
package/lib-esm/index.d.ts
CHANGED
package/lib-esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OperationTypeNode } from 'graphql';
|
|
2
|
-
import Observable from '
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
3
|
import { CustomUserAgentDetails } from '@aws-amplify/core/internals/utils';
|
|
4
4
|
import { GraphQLResult, GraphQLOperation, GraphQLOptions } from '../types';
|
|
5
5
|
export declare const graphqlOperation: (query: any, variables?: {}, authToken?: string) => {
|
|
@@ -233,9 +233,9 @@ var InternalGraphQLAPIClass = /** @class */ (function () {
|
|
|
233
233
|
return this.appSyncRealTime.subscribe({
|
|
234
234
|
query: print(query),
|
|
235
235
|
variables: variables,
|
|
236
|
-
appSyncGraphqlEndpoint: AppSync.endpoint,
|
|
237
|
-
region: AppSync.region,
|
|
238
|
-
authenticationType: AppSync.defaultAuthMode,
|
|
236
|
+
appSyncGraphqlEndpoint: AppSync === null || AppSync === void 0 ? void 0 : AppSync.endpoint,
|
|
237
|
+
region: AppSync === null || AppSync === void 0 ? void 0 : AppSync.region,
|
|
238
|
+
authenticationType: AppSync === null || AppSync === void 0 ? void 0 : AppSync.defaultAuthMode,
|
|
239
239
|
});
|
|
240
240
|
};
|
|
241
241
|
return InternalGraphQLAPIClass;
|