dotansimha / dotansimha/graphql-code-generator

Use indexed access types in mappers

Open
#9,585 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.3k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
23

Description

### Is your feature request related to a problem? Please describe.

The database typescript generator that I use generates only an object type with each table type accessible via index access. It would just be nice not having to manually create types for this, but instead access them directly.

### Describe the solution you'd like

```
config: {
mappers: {
User: './db-codegen#Tables["user"]',
Book: './db-codegen#Tables["book"]',
}
},
```

### Describe alternatives you've considered

_No response_

### Is your feature request related to a problem? Please describe.

Yes, its reduces the amount of manual creation of types for each individual type.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.