Skip to content

Commit 8502a78

Browse files
authored
Adding maintenance mode information (#746)
* Adding maintenance mode information
1 parent dc5bc39 commit 8502a78

File tree

1 file changed

+69
-90
lines changed

1 file changed

+69
-90
lines changed

README.md

Lines changed: 69 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
# AWS AppSync JavaScript SDK · [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/)
1+
# Use AWS AppSync with JavaScript apps · [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/)
22

33
![AWS AppSync](https://s3.amazonaws.com/aws-mobile-hub-images/awsappsyncgithub.png)
44

55
[AWS AppSync](https://aws.amazon.com/appsync/) is a fully managed service that makes it easy to develop GraphQL APIs by handling the heavy lifting of securely connecting to data sources like AWS DynamoDB, Lambda, and more.
66

77
You can use any HTTP or GraphQL client to connect to a GraphQL API on AppSync.
88

9-
For front-end web and mobile development, we recommend using the [Amplify](https://aws-amplify.github.io/) clients which are optimized to connect to the AppSync backend.
9+
For front-end web and mobile development, we recommend using the [AWS Amplify library](https://docs.amplify.aws/lib/graphqlapi/getting-started/q/platform/js/) which is optimized to connect to the AppSync backend.
1010

11-
- For DynamoDB data sources, use the DataStore category in the Amplify client. It provides the best developer experience and built-in conflict detection and resolution.
12-
- For non-DynamoDB data sources in scenarios where you have no offline requirements, use the API (GraphQL) category in the Amplify client.
13-
- For use cases where you are utilizing the Apollo V3 client, use the Apollo Links in this repository to help with authorization and subscriptions.
11+
- For DynamoDB data sources where conflict detection and resolution are enabled on AppSync, use the [DataStore category in the Amplify library](https://docs.amplify.aws/lib/datastore/getting-started/q/platform/js/).
12+
- For non-DynamoDB data sources in scenarios where you have no offline requirements, use the [API (GraphQL) category in the Amplify library](https://docs.amplify.aws/lib/graphqlapi/getting-started/q/platform/js/).
13+
- If you want to use the Apollo V3 client, use the Apollo Links in this repository to help with authorization and subscriptions.
14+
15+
**Looking for the AWS AppSync SDK for JavaScript (built on Apollo v2)?** AWS AppSync SDK for JavaScript (V2) is now in Maintenance Mode until June 30th, 2024. This means that we will continue to include updates to ensure compatibility with backend services and security. No new features will be introduced in the AWS AppSync SDK for JavaScript (V2). Please review the [upgrade guide](https://docs.amplify.aws/lib/graphqlapi/upgrade-guide/q/platform/js) for recommended next steps.
1416

1517
## [AWS AppSync](https://aws.amazon.com/appsync/) Links for Apollo V3
1618

@@ -26,86 +28,6 @@ If you would like to use the [Apollo JavaScript client version 3](https://www.ap
2628

2729
[Example usage of Apollo V3 links](#using-authorization-and-subscription-links-with-apollo-client-v3-no-offline-support)
2830

29-
---
30-
31-
## [AWS AppSync](https://aws.amazon.com/appsync/) JavaScript SDK
32-
33-
The `aws-appsync` and `aws-appsync-react` packages work with the [Apollo client version 2](https://www.apollographql.com/docs/react/v2) and provide offline capabilities.
34-
35-
**Note:** if you do not have any offline requirements in your app, we recommend using the [Amplify libraries](https://aws-amplify.github.io/).
36-
37-
![npm](https://img.shields.io/npm/dm/aws-appsync.svg)
38-
39-
| package | version |
40-
| ----------------- | ---------------------------------------------------------- |
41-
| aws-appsync | ![npm](https://img.shields.io/npm/v/aws-appsync.svg) |
42-
| aws-appsync-react | ![npm](https://img.shields.io/npm/v/aws-appsync-react.svg) |
43-
44-
### Installation
45-
46-
#### npm
47-
48-
```sh
49-
npm install --save aws-appsync
50-
```
51-
52-
#### yarn
53-
54-
```sh
55-
yarn add aws-appsync
56-
```
57-
58-
#### React Native Compatibility
59-
60-
When using this library with React Native, you need to ensure you are using the correct version of the library based on your version of React Native. Take a look at the table below to determine what version to use.
61-
62-
| `aws-appsync` version | Required React Native Version |
63-
| --------------------- | ----------------------------- |
64-
| `2.x.x` | `>= 0.60` |
65-
| `1.x.x` | `<= 0.59` |
66-
67-
If you are using React Native `0.60` and above, you also need to install `@react-native-community/netinfo` and `@react-native-community/async-storage`:
68-
69-
```sh
70-
npm install --save @react-native-community/netinfo@5.9.4 @react-native-community/async-storage
71-
```
72-
73-
or
74-
75-
```sh
76-
yarn add @react-native-community/netinfo@5.9.4 @react-native-community/async-storage
77-
```
78-
79-
If you are using React Native `0.60+` for iOS, run the following command as an additional step:
80-
81-
```sh
82-
npx pod-install
83-
```
84-
85-
---
86-
87-
## Usage
88-
89-
Please visit the [documentation with the Amplify Framework](https://aws-amplify.github.io/docs/js/api) for detailed instructions.
90-
91-
- [React / React Native](#react--react-native)
92-
- [Using Authorization and Subscription links with Apollo Client V3 (No offline support)](#using-authorization-and-subscription-links-with-apollo-client-v3-no-offline-support)
93-
- [Queries and Subscriptions using Apollo V3](#queries-and-subscriptions-using-apollo-v3)
94-
- [Creating a client (Apollo V2)](#creating-a-client-apollo-v2)
95-
- [Queries](#queries)
96-
- [Mutations & optimistic UI (with graphqlMutation helper)](#mutations--optimistic-ui-with-graphqlmutation-helper)
97-
- [Mutations & optimistic UI (without graphqlMutation helper)](#mutations--optimistic-ui-without-graphqlmutation-helper)
98-
- [Subscriptions (with buildSubscription helper)](#subscriptions-with-buildsubscription-helper)
99-
- [Subscriptions (without buildSubscription helper)](#subscriptions-without-buildsubscription-helper)
100-
- [Offline configuration (Apollo V2)](#offline-configuration-apollo-v2)
101-
- [Error handling](#error-handling)
102-
- [Custom storage engine](#custom-storage-engine)
103-
- [Offline helpers](#offline-helpers)
104-
- [Vue](#vue)
105-
- [main.js](#mainjs)
106-
- [App.vue](#appvue)
107-
- [connected component](#connected-component)
108-
10931
### React / React Native
11032

11133
For more documentation on `graphql` operations performed by React Apollo see their [documentation](https://www.apollographql.com/docs/react/).
@@ -163,7 +85,7 @@ const ApolloWrapper = ({ children }) => {
16385
};
16486
```
16587

166-
#### Queries and Subscriptions using Apollo V3
88+
### Queries and Subscriptions using Apollo V3
16789

16890
```js
16991
import React, { useState, useEffect } from "react";
@@ -259,7 +181,64 @@ const App = () => {
259181
export default App;
260182
```
261183

262-
### Creating a client (Apollo V2)
184+
185+
---
186+
187+
## [AWS AppSync](https://aws.amazon.com/appsync/) JavaScript SDK based on Apollo V2 (Maintenance mode)
188+
189+
The `aws-appsync` and `aws-appsync-react` packages work with the [Apollo client version 2](https://www.apollographql.com/docs/react/v2) and provide offline capabilities.
190+
191+
**Note:** if you do not have any offline requirements in your app, we recommend using the [Amplify libraries](https://aws-amplify.github.io/).
192+
193+
![npm](https://img.shields.io/npm/dm/aws-appsync.svg)
194+
195+
| package | version |
196+
| ----------------- | ---------------------------------------------------------- |
197+
| aws-appsync | ![npm](https://img.shields.io/npm/v/aws-appsync.svg) |
198+
| aws-appsync-react | ![npm](https://img.shields.io/npm/v/aws-appsync-react.svg) |
199+
200+
### Installation
201+
202+
#### npm
203+
204+
```sh
205+
npm install --save aws-appsync
206+
```
207+
208+
#### yarn
209+
210+
```sh
211+
yarn add aws-appsync
212+
```
213+
214+
#### React Native Compatibility
215+
216+
When using this library with React Native, you need to ensure you are using the correct version of the library based on your version of React Native. Take a look at the table below to determine what version to use.
217+
218+
| `aws-appsync` version | Required React Native Version |
219+
| --------------------- | ----------------------------- |
220+
| `2.x.x` | `>= 0.60` |
221+
| `1.x.x` | `<= 0.59` |
222+
223+
If you are using React Native `0.60` and above, you also need to install `@react-native-community/netinfo` and `@react-native-community/async-storage`:
224+
225+
```sh
226+
npm install --save @react-native-community/netinfo@5.9.4 @react-native-community/async-storage
227+
```
228+
229+
or
230+
231+
```sh
232+
yarn add @react-native-community/netinfo@5.9.4 @react-native-community/async-storage
233+
```
234+
235+
If you are using React Native `0.60+` for iOS, run the following command as an additional step:
236+
237+
```sh
238+
npx pod-install
239+
```
240+
241+
### Creating a client with AppSync SDK for JavaScript V2 (Maintenance mode)
263242

264243
```js
265244
import AWSAppSyncClient from "aws-appsync";
@@ -576,7 +555,7 @@ export default graphql(listPosts, {
576555
})(App);
577556
```
578557

579-
### Complex objects (Apollo V2)
558+
### Complex objects with AWS AppSync SDK for JavaScript (Maintenance mode)
580559

581560
Many times you might want to create logical objects that have more complex data, such as images or videos, as part of their structure. For example, you might create a Person type with a profile picture or a Post type that has an associated image. With AWS AppSync, you can model these as GraphQL types, referred to as complex objects. If any of your mutations have a variable with bucket, key, region, mimeType and localUri fields, the SDK uploads the file to Amazon S3 for you.
582561

@@ -656,7 +635,7 @@ const client = new AWSAppSyncClient({
656635

657636
When you run the above mutation, a record will be in a DynamoDB table for your AppSync API as well as the corresponding file in an S3 bucket.
658637

659-
### Offline configuration (Apollo V2)
638+
### Offline configuration with AWS AppSync SDK for JavaScript (Maintenance mode)
660639

661640
When using the AWS AppSync SDK offline capabilities (e.g. `disableOffline: false`), you can provide configurations for the following:
662641

@@ -717,7 +696,7 @@ const client = new AWSAppSyncClient({
717696

718697
For detailed documentation about the offline helpers, look at the [API Definition](OFFLINE_HELPERS.md).
719698

720-
### Vue
699+
### Vue sample with AWS AppSync SDK for JavaScript (Maintenance mode)
721700

722701
For more documentation on Vue Apollo click [here](https://github.com/Akryum/vue-apollo).
723702

0 commit comments

Comments
 (0)