aws-amplify / aws-amplify/amplify-codegen
Better defaults for .graphqlconfig.yml
- Dominant language
- TypeScript
- Stars
- 59
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
Amplify codegen dumps it's graphql all over the place like an itinerant toddler.
**Describe the solution you'd like**
Dump all the generated code for an api in a folder named for the API
```yaml
projects:
{ApiName}:
schemaPath: src/{ApiName}/schema.json
includes:
- src/{ApiName}/**/*.ts
excludes:
- ./amplify/**
- src/{ApiName}/types.ts
extensions:
amplify:
codeGenTarget: typescript
generatedFileName: src/{ApiName}/types.ts
docsFilePath: src/{ApiName}
extensions:
amplify:
version: 3
```
There could even be some barrels for importing convenience
```typescript
// {ApiName}/index.ts
export * from './mutations'
export * from './queries'
export * from './subscriptions'
export * from './types'
```
```typescript
// index.ts
export * as {ApiName} from './ {ApiName}'
```
Contributor guide
Assessment
This issue has not been assessed yet.