# pb-cloud

Future home for our AWS Amplify and CloudFormation resources

## Environments

+ production (prod)
+ development (dev)
+ developer specific (sean-dev, chris-dev etc)

## Getting Started (Consumption)

`npm install --save @hunterdouglas/pb-cloud`

Useful files to import
```
import * as queries from "@hunterdouglas/pb-cloud/queries";
import * as subscriptions from "@hunterdouglas/pb-cloud/subscriptions";
import * as mutations from "@hunterdouglas/pb-cloud/mutations";
import * as API from "@hunterdouglas/pb-cloud/API";
```

These files are auto generated and include ALL fields to a certain nested depth level.  (i.e. if you use the `GetRoomQuery`, every room field will be populated on room).  Fields will be populated down to the nested depth level we are currently using ( 4 ).  In practice, this means immediate relationships are filled while deeply nested ones are not.  (i.e. every shade in room.shades is fully populated from `GetRoomQuery`, but (example) home.room.remote.group1.shades will not be populated from a `GetHomeQuery`).  If you need more deeply nested queries you can always write them manually.  


## Getting Started (Development)

1. :TODO Explain how to get credentials
2. :TODO Explain how to create your own env


## Development Flow

1. Work on your personal env, push it back down to (amplify env) dev
2. :TODO document the process further

## Autogenerated Files

```
// Queries
"@hunterdouglas/pb-cloud/queries";
// Subscriptions
"@hunterdouglas/pb-cloud/subscriptions";
// Mutations
"@hunterdouglas/pb-cloud/mutations";
// Input/Filter/Query etc types
"@hunterdouglas/pb-cloud/API";
// AWS Access configuration
"@hunterdouglas/aws-exports";
```
