dotansimha / dotansimha/graphql-code-generator

Add more config options for typescript-operations

Open
#3,594 2 comments 5 reactions 0 assignees View on GitHub
core kind/enhancement plugins
Dominant language
TypeScript
Stars
11.3k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
23

Description

I was using `typescript-operations` plugin recently and I was thinking if there could be two more config options:

1. `typescript` plugin has `declarationKind` but the same option would make sense for `typescript-operations` as well for example for generated query variables.

2. Right now `typescript-operations` has to be used with `typescript` plugin because it uses its `Query` and `Scalars` types.
For example I have a monorepo app with single backend and three different frontends but I have to use `typescript` and `typescript-operations` together in every frontend app so each frontend contains the same schema types. However, I could just generate the schema types once and then import them in each frontend. I made a small plugin that only adds one import `import { Query, Scalars } from '@myapp/backend';` so I can use `typescript-operations` without `typescript`. It would be great if I could have a config option to import `Query` and `Scalars` from a previously generated schema types.

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.