glideapps / glideapps/quicktype
Keep separate GraphQL types as separate classes
- Dominant language
- TypeScript
- Stars
- 13.9k
- Forks
- 1.2k
- Avg merge
- 8h 53m
- Merged PRs (30d)
- 369
Description
Howdy!
I'm trying to generate Typescript types from an introspected GraphQL schema.
## What I did
I want to avoid combining similar classes, so I'm adding `--no-combine-classes`. My full command:
```sh
quicktype --src-lang graphql --lang typescript --graphql-schema schema.json --just-types --no-combine-classes query.json
```
## What I expected
The following combined class called `GridConfigClass` to be removed
```ts
export interface Grid {
config: GridConfigClass | null;
props: GridConfigClass | null;
}
export interface GridConfigClass {
items: Array;
}
```
and replaced with separate interfaces
```ts
export interface Grid {
config: GridConfig | null;
props: GridProps | null;
}
export interface GridConfig {
items: Array;
}
export interface GridProps {
items: Array;
}
```
## What happened
The output didn't change, and the combined `GridConfigClass` remains.
---
Thanks for the awesome tool.
Contributor guide
Assessment
This issue has not been assessed yet.