diff --git a/.gitignore b/.gitignore
index 43fdc284..35fdb0c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ lib
lerna-debug.log
yarn.lock
.npmrc
+yarn.lock
diff --git a/packages/aws-appsync-auth-link/CHANGELOG.md b/packages/aws-appsync-auth-link/CHANGELOG.md
index a7047c25..3e122f36 100644
--- a/packages/aws-appsync-auth-link/CHANGELOG.md
+++ b/packages/aws-appsync-auth-link/CHANGELOG.md
@@ -1,6 +1,6 @@
# Change Log
-All notable changes to this project will be documented in this file.
+All notable changes to this project will be documented in this file.1
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
diff --git a/packages/aws-appsync-auth-link/package.json b/packages/aws-appsync-auth-link/package.json
index ada1a911..f9e7f58e 100644
--- a/packages/aws-appsync-auth-link/package.json
+++ b/packages/aws-appsync-auth-link/package.json
@@ -1,6 +1,6 @@
{
- "name": "aws-appsync-auth-link",
- "version": "2.0.2",
+ "name": "@boxcc/aws-appsync-auth-link",
+ "version": "3.0.2",
"main": "lib/index.js",
"license": "Apache-2.0",
"description": "AWS Mobile AppSync Auth Link for JavaScript",
@@ -19,8 +19,9 @@
"test-watch": "jest --watch"
},
"dependencies": {
- "apollo-link": "^1.2.3",
+ "@apollo/client": "^3.1.1",
"aws-sdk": "^2.518.0",
"debug": "2.6.9"
- }
+ },
+ "gitHead": "4307763211df51882f599527e41e9aa5e07ec8c3"
}
diff --git a/packages/aws-appsync-auth-link/src/auth-link.ts b/packages/aws-appsync-auth-link/src/auth-link.ts
index 326239dd..d1a70b07 100644
--- a/packages/aws-appsync-auth-link/src/auth-link.ts
+++ b/packages/aws-appsync-auth-link/src/auth-link.ts
@@ -2,9 +2,7 @@
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
-import { Observable, Operation, NextLink } from 'apollo-link';
-import { ApolloLink } from 'apollo-link';
-import { ExecutionResult } from 'graphql';
+import { ApolloLink, Observable } from '@apollo/client';
import { print } from 'graphql/language/printer';
import { Signer } from './signer';
diff --git a/packages/aws-appsync-auth-link/src/index.ts b/packages/aws-appsync-auth-link/src/index.ts
index 1eb7624c..71cf2b98 100644
--- a/packages/aws-appsync-auth-link/src/index.ts
+++ b/packages/aws-appsync-auth-link/src/index.ts
@@ -1,6 +1,5 @@
import { AuthLink, AuthOptions, AUTH_TYPE, USER_AGENT_HEADER, USER_AGENT } from './auth-link';
-
export const createAuthLink = ({ url, region, auth }: { url: string, region: string, auth: AuthOptions }) => new AuthLink({ url, region, auth });
export { AuthLink, AuthOptions, AUTH_TYPE, USER_AGENT_HEADER, USER_AGENT };
diff --git a/packages/aws-appsync-react/CHANGELOG.md b/packages/aws-appsync-react/CHANGELOG.md
index 77e69f40..dbb971be 100644
--- a/packages/aws-appsync-react/CHANGELOG.md
+++ b/packages/aws-appsync-react/CHANGELOG.md
@@ -1,6 +1,6 @@
# Change Log
-All notable changes to this project will be documented in this file.
+All notable changes to this project will be documented in this file.1
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
diff --git a/packages/aws-appsync-react/package.json b/packages/aws-appsync-react/package.json
index 49107b5a..2722313d 100644
--- a/packages/aws-appsync-react/package.json
+++ b/packages/aws-appsync-react/package.json
@@ -1,6 +1,6 @@
{
- "name": "aws-appsync-react",
- "version": "4.0.0",
+ "name": "@boxcc/aws-appsync-react",
+ "version": "4.0.2",
"main": "lib/index.js",
"license": "Apache-2.0",
"description": "AWS Mobile AppSync SDK for JavaScript - React and React Native components",
@@ -21,14 +21,15 @@
"prop-types": "^15.6.0"
},
"peerDependencies": {
- "aws-appsync": "3.x.x",
+ "@boxcc/aws-appsync": "4.x.x",
+ "@react-native-community/netinfo": "5.x.x",
"react": "0.14.x || 15.* || ^15.0.0 || ^16.0.0",
"react-apollo": "2.x"
},
"devDependencies": {
+ "@boxcc/aws-appsync": "^4.0.2",
"@react-native-community/netinfo": "^5.0.0",
"@types/react": "^16.0.25",
- "aws-appsync": "^4.0.0",
"react": "^16.1.1",
"react-apollo": "^2.1.9",
"react-native": "^0.50.3",
@@ -36,5 +37,6 @@
},
"react-native": {
"./lib/rehydrated": "./lib/rehydrated-rn"
- }
+ },
+ "gitHead": "4307763211df51882f599527e41e9aa5e07ec8c3"
}
diff --git a/packages/aws-appsync-react/src/offline-helpers.tsx b/packages/aws-appsync-react/src/offline-helpers.tsx
index 1b0c638e..f6de6390 100644
--- a/packages/aws-appsync-react/src/offline-helpers.tsx
+++ b/packages/aws-appsync-react/src/offline-helpers.tsx
@@ -5,7 +5,7 @@ import { resultKeyNameFromField } from 'apollo-utilities';
import { DocumentNode, OperationDefinitionNode, FieldNode } from 'graphql';
import { graphql, OptionProps, MutationOpts } from 'react-apollo';
-import { buildMutation, CacheOperationTypes, CacheUpdatesOptions } from 'aws-appsync';
+import { buildMutation, CacheOperationTypes, CacheUpdatesOptions } from '@boxcc/aws-appsync';
export const graphqlMutation = (
mutation: DocumentNode,
diff --git a/packages/aws-appsync-react/src/rehydrated-rn.tsx b/packages/aws-appsync-react/src/rehydrated-rn.tsx
index 030fb899..fb3d1043 100644
--- a/packages/aws-appsync-react/src/rehydrated-rn.tsx
+++ b/packages/aws-appsync-react/src/rehydrated-rn.tsx
@@ -7,7 +7,7 @@ import { View, Text, StyleSheet, ViewPropTypes } from "react-native";
import NetInfo from '@react-native-community/netinfo';
import * as PropTypes from 'prop-types';
-import AWSAppSyncClient from 'aws-appsync';
+import AWSAppSyncClient from '@boxcc/aws-appsync';
import { RehydratedState } from './index'
export interface RehydrateProps {
diff --git a/packages/aws-appsync-react/src/rehydrated.tsx b/packages/aws-appsync-react/src/rehydrated.tsx
index 37a6699d..95e92303 100644
--- a/packages/aws-appsync-react/src/rehydrated.tsx
+++ b/packages/aws-appsync-react/src/rehydrated.tsx
@@ -5,7 +5,7 @@
import * as React from 'react';
import * as PropTypes from 'prop-types';
-import AWSAppSyncClient from 'aws-appsync';
+import AWSAppSyncClient from '@boxcc/aws-appsync';
import { RehydratedState } from './index';
export interface RehydrateProps {
diff --git a/packages/aws-appsync-subscription-link/CHANGELOG.md b/packages/aws-appsync-subscription-link/CHANGELOG.md
index 764d7b44..3cc7d04c 100644
--- a/packages/aws-appsync-subscription-link/CHANGELOG.md
+++ b/packages/aws-appsync-subscription-link/CHANGELOG.md
@@ -1,6 +1,6 @@
# Change Log
-All notable changes to this project will be documented in this file.
+All notable changes to this project will be documented in this file.1
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
diff --git a/packages/aws-appsync-subscription-link/__tests__/link/realtime-subscription-handshake-link-test.ts b/packages/aws-appsync-subscription-link/__tests__/link/realtime-subscription-handshake-link-test.ts
index b447bf32..32a6a334 100644
--- a/packages/aws-appsync-subscription-link/__tests__/link/realtime-subscription-handshake-link-test.ts
+++ b/packages/aws-appsync-subscription-link/__tests__/link/realtime-subscription-handshake-link-test.ts
@@ -1,5 +1,5 @@
-import { AUTH_TYPE } from "aws-appsync-auth-link";
-import { execute } from "apollo-link";
+import { AUTH_TYPE } from "@boxcc/aws-appsync-auth-link";
+import { execute } from "@apollo/client";
import gql from 'graphql-tag';
import { AppSyncRealTimeSubscriptionHandshakeLink } from '../../src/realtime-subscription-handshake-link';
diff --git a/packages/aws-appsync-subscription-link/package.json b/packages/aws-appsync-subscription-link/package.json
index fb94ab51..214dc183 100644
--- a/packages/aws-appsync-subscription-link/package.json
+++ b/packages/aws-appsync-subscription-link/package.json
@@ -1,6 +1,6 @@
{
- "name": "aws-appsync-subscription-link",
- "version": "2.2.0",
+ "name": "@boxcc/aws-appsync-subscription-link",
+ "version": "3.0.2",
"main": "lib/index.js",
"license": "Apache-2.0",
"description": "AWS Mobile AppSync SDK for JavaScript",
@@ -19,11 +19,10 @@
"test-watch": "jest --watch"
},
"dependencies": {
- "apollo-link": "^1.2.3",
- "apollo-link-context": "^1.0.9",
- "apollo-link-http": "^1.3.1",
- "apollo-link-retry": "^2.2.5",
- "aws-appsync-auth-link": "^2.0.2",
+ "@apollo/client": "^3.1.1",
+ "@apollo/link-context": "^2.0.0-beta.3",
+ "@apollo/link-retry": "^2.0.0-beta.3",
+ "@boxcc/aws-appsync-auth-link": "^3.0.2",
"debug": "2.6.9",
"url": "^0.11.0"
},
@@ -31,6 +30,7 @@
"@redux-offline/redux-offline": "2.5.2-native.0"
},
"peerDependencies": {
- "apollo-client": "2.x"
- }
+ "@apollo/client": "3.x"
+ },
+ "gitHead": "4307763211df51882f599527e41e9aa5e07ec8c3"
}
diff --git a/packages/aws-appsync-subscription-link/src/index.ts b/packages/aws-appsync-subscription-link/src/index.ts
index 7790ac1c..00e142a7 100644
--- a/packages/aws-appsync-subscription-link/src/index.ts
+++ b/packages/aws-appsync-subscription-link/src/index.ts
@@ -2,8 +2,7 @@ import {
SubscriptionHandshakeLink,
CONTROL_EVENTS_KEY
} from "./subscription-handshake-link";
-import { ApolloLink, Observable } from "apollo-link";
-import { createHttpLink } from "apollo-link-http";
+import { ApolloLink, Observable, createHttpLink } from "@apollo/client";
import { getMainDefinition } from "apollo-utilities";
import { NonTerminatingLink } from "./non-terminating-link";
import { OperationDefinitionNode } from "graphql";
@@ -31,7 +30,7 @@ function createSubscriptionHandshakeLink(
resultsFetcherLink =
theResultsFetcherLink || createHttpLink({ uri: infoOrUrl });
subscriptionLinks = ApolloLink.from([
- new NonTerminatingLink("controlMessages", {
+ (new NonTerminatingLink("controlMessages", {
link: new ApolloLink(
(operation, _forward) =>
new Observable(observer => {
@@ -48,14 +47,14 @@ function createSubscriptionHandshakeLink(
return () => {};
})
)
- }),
- new NonTerminatingLink("subsInfo", { link: resultsFetcherLink }),
- new SubscriptionHandshakeLink("subsInfo")
+ }) as unknown) as ApolloLink,
+ (new NonTerminatingLink("subsInfo", { link: resultsFetcherLink }) as unknown) as ApolloLink,
+ (new SubscriptionHandshakeLink("subsInfo") as unknown) as ApolloLink
]);
} else {
const { url } = infoOrUrl;
resultsFetcherLink = theResultsFetcherLink || createHttpLink({ uri: url });
- subscriptionLinks = new AppSyncRealTimeSubscriptionHandshakeLink(infoOrUrl);
+ subscriptionLinks = new AppSyncRealTimeSubscriptionHandshakeLink(infoOrUrl) as unknown as ApolloLink;
}
return ApolloLink.split(
diff --git a/packages/aws-appsync-subscription-link/src/non-terminating-http-link.ts b/packages/aws-appsync-subscription-link/src/non-terminating-http-link.ts
index 80b6ddec..3fbc55e2 100644
--- a/packages/aws-appsync-subscription-link/src/non-terminating-http-link.ts
+++ b/packages/aws-appsync-subscription-link/src/non-terminating-http-link.ts
@@ -2,11 +2,11 @@
* Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
-import { createHttpLink, FetchOptions } from 'apollo-link-http';
+import { createHttpLink, HttpOptions } from '@apollo/client';
import { NonTerminatingLink } from './non-terminating-link';
export class NonTerminatingHttpLink extends NonTerminatingLink {
- constructor(contextKey: string, options: FetchOptions) {
+ constructor(contextKey: string, options: HttpOptions) {
const link = createHttpLink(options);
super(contextKey, { link });
diff --git a/packages/aws-appsync-subscription-link/src/non-terminating-link.ts b/packages/aws-appsync-subscription-link/src/non-terminating-link.ts
index da9f21ff..caf9fbcc 100644
--- a/packages/aws-appsync-subscription-link/src/non-terminating-link.ts
+++ b/packages/aws-appsync-subscription-link/src/non-terminating-link.ts
@@ -2,8 +2,8 @@
* Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
-import { ApolloLink, NextLink } from 'apollo-link';
-import { setContext } from 'apollo-link-context';
+import { ApolloLink, NextLink } from '@apollo/client';
+import { setContext } from '@apollo/link-context';
export class NonTerminatingLink extends ApolloLink {
diff --git a/packages/aws-appsync-subscription-link/src/realtime-subscription-handshake-link.ts b/packages/aws-appsync-subscription-link/src/realtime-subscription-handshake-link.ts
index 54132a1b..3584e8e0 100644
--- a/packages/aws-appsync-subscription-link/src/realtime-subscription-handshake-link.ts
+++ b/packages/aws-appsync-subscription-link/src/realtime-subscription-handshake-link.ts
@@ -2,7 +2,7 @@
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
-import { ApolloLink, Observable, Operation, FetchResult } from "apollo-link";
+import { ApolloLink, Observable, Operation, FetchResult } from "@apollo/client";
import { rootLogger } from "./utils";
@@ -12,7 +12,7 @@ import {
AUTH_TYPE,
USER_AGENT_HEADER,
USER_AGENT
-} from "aws-appsync-auth-link";
+} from "@boxcc/aws-appsync-auth-link";
import { GraphQLError, print } from "graphql";
import * as url from "url";
import { v4 as uuid } from "uuid";
diff --git a/packages/aws-appsync-subscription-link/src/subscription-handshake-link.ts b/packages/aws-appsync-subscription-link/src/subscription-handshake-link.ts
index 64d52873..8e57fdc2 100644
--- a/packages/aws-appsync-subscription-link/src/subscription-handshake-link.ts
+++ b/packages/aws-appsync-subscription-link/src/subscription-handshake-link.ts
@@ -2,11 +2,10 @@
* Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
-import { ApolloLink, Observable, Operation, FetchResult } from "apollo-link";
+import { ApolloLink, Observable, Operation, FetchResult, ApolloError } from "@apollo/client";
import { rootLogger } from "./utils";
import * as Paho from './vendor/paho-mqtt';
-import { ApolloError } from "apollo-client";
import { FieldNode } from "graphql";
import { getMainDefinition } from "apollo-utilities";
diff --git a/packages/aws-appsync-subscription-link/src/types/index.ts b/packages/aws-appsync-subscription-link/src/types/index.ts
index 50349ce7..7b864ea7 100644
--- a/packages/aws-appsync-subscription-link/src/types/index.ts
+++ b/packages/aws-appsync-subscription-link/src/types/index.ts
@@ -1,4 +1,4 @@
-import { AuthOptions } from "aws-appsync-auth-link";
+import { AuthOptions } from "@boxcc/aws-appsync-auth-link";
//#region Subscription link enums
diff --git a/packages/aws-appsync/CHANGELOG.md b/packages/aws-appsync/CHANGELOG.md
index 24154e22..05484f51 100644
--- a/packages/aws-appsync/CHANGELOG.md
+++ b/packages/aws-appsync/CHANGELOG.md
@@ -1,6 +1,6 @@
# Change Log
-All notable changes to this project will be documented in this file.
+All notable changes to this project will be documented in this file.1
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
diff --git a/packages/aws-appsync/__tests__/client.ts b/packages/aws-appsync/__tests__/client.ts
index 509db3a3..ff5961f9 100644
--- a/packages/aws-appsync/__tests__/client.ts
+++ b/packages/aws-appsync/__tests__/client.ts
@@ -34,7 +34,7 @@ beforeEach(() => {
const { AWSAppSyncClient } = require('../src/client');
({ isOptimistic } = require("../src/link/offline-link"));
({ createHttpLink } = require("apollo-link-http"));
- ({ Signer } = require("aws-appsync-auth-link"));
+ ({ Signer } = require("@boxcc/aws-appsync-auth-link"));
factory = (opts) => {
return new AWSAppSyncClient(opts);
diff --git a/packages/aws-appsync/package.json b/packages/aws-appsync/package.json
index deab2876..bfefaab4 100644
--- a/packages/aws-appsync/package.json
+++ b/packages/aws-appsync/package.json
@@ -1,6 +1,6 @@
{
- "name": "aws-appsync",
- "version": "4.0.0",
+ "name": "@boxcc/aws-appsync",
+ "version": "4.0.2",
"main": "lib/index.js",
"license": "Apache-2.0",
"description": "AWS Mobile AppSync SDK for JavaScript",
@@ -19,6 +19,8 @@
"test-watch": "jest --watch"
},
"dependencies": {
+ "@boxcc/aws-appsync-auth-link": "^3.0.2",
+ "@boxcc/aws-appsync-subscription-link": "^3.0.2",
"@redux-offline/redux-offline": "2.5.2-native.3",
"apollo-cache-inmemory": "1.3.12",
"apollo-client": "2.4.6",
@@ -26,8 +28,6 @@
"apollo-link-context": "1.0.9",
"apollo-link-http": "1.3.1",
"apollo-link-retry": "2.2.5",
- "aws-appsync-auth-link": "^2.0.2",
- "aws-appsync-subscription-link": "^2.2.0",
"aws-sdk": "2.518.0",
"debug": "2.6.9",
"graphql": "0.13.0",
@@ -40,5 +40,6 @@
"peerDependencies": {
"@react-native-community/async-storage": "^1.11.0",
"@react-native-community/netinfo": "^5.0.0"
- }
+ },
+ "gitHead": "4307763211df51882f599527e41e9aa5e07ec8c3"
}
diff --git a/packages/aws-appsync/src/client.ts b/packages/aws-appsync/src/client.ts
index 7cd99266..90b13fab 100644
--- a/packages/aws-appsync/src/client.ts
+++ b/packages/aws-appsync/src/client.ts
@@ -18,8 +18,8 @@ import {
} from './link';
import { createStore, StoreOptions, DEFAULT_KEY_PREFIX } from './store';
import { ApolloCache } from 'apollo-cache';
-import { AuthOptions, AuthLink, AUTH_TYPE } from 'aws-appsync-auth-link';
-import { createSubscriptionHandshakeLink } from 'aws-appsync-subscription-link';
+import { AuthOptions, AuthLink, AUTH_TYPE } from '@boxcc/aws-appsync-auth-link';
+import { createSubscriptionHandshakeLink } from '@boxcc/aws-appsync-subscription-link';
import { Credentials, CredentialsOptions } from 'aws-sdk/lib/credentials';
import { OperationDefinitionNode, DocumentNode } from 'graphql';
import { passthroughLink } from './utils';
diff --git a/packages/aws-appsync/src/deltaSync.ts b/packages/aws-appsync/src/deltaSync.ts
index b9d597ff..c1990e87 100644
--- a/packages/aws-appsync/src/deltaSync.ts
+++ b/packages/aws-appsync/src/deltaSync.ts
@@ -18,7 +18,7 @@ import { SKIP_RETRY_KEY } from "./link/retry-link";
import { DocumentNode, print, OperationDefinitionNode, FieldNode, ExecutionResult } from "graphql";
import { getOpTypeFromOperationName, CacheOperationTypes, getUpdater, QueryWithVariables } from "./helpers/offline";
import { boundSaveSnapshot, replaceUsingMap, EnqueuedMutationEffect, offlineEffectConfig as mutationsConfig } from "./link/offline-link";
-import { CONTROL_EVENTS_KEY } from "aws-appsync-subscription-link";
+import { CONTROL_EVENTS_KEY } from "@boxcc/aws-appsync-subscription-link";
const logger = rootLogger.extend('deltasync');
diff --git a/packages/aws-appsync/src/index.ts b/packages/aws-appsync/src/index.ts
index d8b0bf75..4d13c27b 100644
--- a/packages/aws-appsync/src/index.ts
+++ b/packages/aws-appsync/src/index.ts
@@ -4,7 +4,7 @@
*/
import AWSAppSyncClient from "./client";
export * from "./client";
-export { Signer } from 'aws-appsync-auth-link';
+export { Signer } from '@boxcc/aws-appsync-auth-link';
export * from './helpers/offline';
export default AWSAppSyncClient;
diff --git a/packages/aws-appsync/src/link/offline-link.ts b/packages/aws-appsync/src/link/offline-link.ts
index 48a8fc74..8d822e29 100644
--- a/packages/aws-appsync/src/link/offline-link.ts
+++ b/packages/aws-appsync/src/link/offline-link.ts
@@ -417,7 +417,7 @@ const idsMapReducer = (state = {}, action, dataIdFromObject) => {
return {
...state,
- ...entries,
+ ...entries as object,
};
case actions.COMMIT:
const { remainingMutations } = action;