Skip to content

Commit 93ece02

Browse files
authored
Merge pull request aws-amplify#4789 from chintannp/react-native-graphql-configure-app-changes
fix(docs): React native add the missing required libraries for configure application section in GraphQL API.
2 parents 2a26897 + e1e3f47 commit 93ece02

File tree

3 files changed

+34
-12
lines changed

3 files changed

+34
-12
lines changed

src/fragments/lib/graphqlapi/js/getting-started.mdx

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,13 @@ To view the deployed services in your project at any time, go to Amplify Console
5959
amplify console
6060
```
6161

62-
## Configure your application
62+
import js0 from "/src/fragments/lib/graphqlapi/js/js-configure.mdx";
6363

64-
Add Amplify to your app with `yarn` or `npm`:
64+
<Fragments fragments={{js: js0}} />
6565

66-
```bash
67-
npm install aws-amplify
68-
```
66+
import reactnative0 from "/src/fragments/lib/graphqlapi/js/react-native-configure.mdx";
6967

70-
In your app's entry point i.e. App.js, import and load the configuration file:
71-
72-
```javascript
73-
import { Amplify, API, graphqlOperation } from 'aws-amplify';
74-
import awsconfig from './aws-exports';
75-
Amplify.configure(awsconfig);
76-
```
68+
<Fragments fragments={{'react-native': reactnative0}} />
7769

7870
## Enable queries, mutations, and subscriptions
7971

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Configure your application
2+
3+
Add Amplify to your app with `yarn` or `npm`:
4+
5+
```bash
6+
npm install aws-amplify
7+
```
8+
9+
In your app's entry point i.e. App.js, import and load the configuration file:
10+
11+
```javascript
12+
import { Amplify, API, graphqlOperation } from 'aws-amplify';
13+
import awsconfig from './aws-exports';
14+
Amplify.configure(awsconfig);
15+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Configure your application
2+
3+
Add Amplify to your app with `yarn` or `npm`:
4+
5+
```bash
6+
npm install aws-amplify @react-native-async-storage/async-storage @react-native-community/netinfo
7+
```
8+
9+
In your app's entry point i.e. **App.js** (Expo) or **index.js** (React Native CLI), import and load the configuration file:
10+
11+
```javascript
12+
import { Amplify, API, graphqlOperation } from 'aws-amplify';
13+
import awsconfig from './aws-exports';
14+
Amplify.configure(awsconfig);
15+
```

0 commit comments

Comments
 (0)