Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
praisegeek committed Dec 19, 2019
1 parent 2c3e586 commit 16553a6
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,26 @@ npm i gatsby-plugin-appsync

## Usage

Create an environment variable file which holds config params inside the root of your project

**.env.[stage-name]**

e.g

.env.development

```yaml
AWS_REGION=eu-west-2
COGNITO_USER_POOL_ID=
COGNITO_APP_CLIENT_ID=
COGNITO_IDENTITY_POOL_ID=
AUTH_TYPE=API_KEY # AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT
AUTH_API_KEY=12345 # if using API_KEY
GRAPHQL_ENDPOINT=<AppSync GraphQL Endpoint>
S3_BUCKET_URL=<S3 Bucket URL> # Required for s3 uploads using complexObjectsCredentials
S3_MAX_ATTACHMENT_SIZE=2000000
```

Add plugin in gatsby-config.js

**Usage with react hooks but no offline support yet**
Expand All @@ -27,7 +47,7 @@ module.exports = {
};
```

Same usage applies as using latest version of React Apollo Version 3+, which supports hooks.
Same usage applies as using the latest version of React Apollo ( v 3+), with hooks.

e.g

Expand Down

0 comments on commit 16553a6

Please sign in to comment.