@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.
@@ -1,6 +1,6 @@
1
1
  import { GraphQLOptions, GraphQLResult } from './types';
2
2
  import { InternalGraphQLAPIClass } from './internals';
3
- import Observable from 'zen-observable-ts';
3
+ import { Observable } from 'rxjs';
4
4
  export declare const graphqlOperation: (query: any, variables?: {}, authToken?: string) => {
5
5
  query: any;
6
6
  variables: {};
@@ -397,11 +397,11 @@ var AWSAppSyncRealTimeProvider = /** @class */ (function () {
397
397
  }
398
398
  if (startAckTimeoutId)
399
399
  clearTimeout(startAckTimeoutId);
400
- // dispatchApiEvent(
401
- // CONTROL_MSG.SUBSCRIPTION_ACK,
402
- // { query, variables },
403
- // 'Connection established for subscription'
404
- // );
400
+ dispatchApiEvent({
401
+ event: PubSub_1.CONTROL_MSG.SUBSCRIPTION_ACK,
402
+ data: { query: query, variables: variables },
403
+ message: 'Connection established for subscription',
404
+ });
405
405
  var subscriptionState = constants_1.SUBSCRIPTION_STATUS.CONNECTED;
406
406
  if (observer) {
407
407
  this.subscriptionObserverMap.set(id, {
package/lib/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export { GraphQLAPI, GraphQLAPIClass, graphqlOperation } from './GraphQLAPI';
2
2
  export * from './types';
3
+ export { CONNECTION_STATE_CHANGE } from './Providers/constants';
package/lib/index.js CHANGED
@@ -8,3 +8,5 @@ exports.GraphQLAPI = GraphQLAPI_1.GraphQLAPI;
8
8
  exports.GraphQLAPIClass = GraphQLAPI_1.GraphQLAPIClass;
9
9
  exports.graphqlOperation = GraphQLAPI_1.graphqlOperation;
10
10
  tslib_1.__exportStar(require("./types"), exports);
11
+ var constants_1 = require("./Providers/constants");
12
+ exports.CONNECTION_STATE_CHANGE = constants_1.CONNECTION_STATE_CHANGE;
@@ -1,5 +1,5 @@
1
1
  import { OperationTypeNode } from 'graphql';
2
- import Observable from 'zen-observable-ts';
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) => {
@@ -235,9 +235,9 @@ var InternalGraphQLAPIClass = /** @class */ (function () {
235
235
  return this.appSyncRealTime.subscribe({
236
236
  query: graphql_1.print(query),
237
237
  variables: variables,
238
- appSyncGraphqlEndpoint: AppSync.endpoint,
239
- region: AppSync.region,
240
- authenticationType: AppSync.defaultAuthMode,
238
+ appSyncGraphqlEndpoint: AppSync === null || AppSync === void 0 ? void 0 : AppSync.endpoint,
239
+ region: AppSync === null || AppSync === void 0 ? void 0 : AppSync.region,
240
+ authenticationType: AppSync === null || AppSync === void 0 ? void 0 : AppSync.defaultAuthMode,
241
241
  });
242
242
  };
243
243
  return InternalGraphQLAPIClass;