Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support adding file contents via 'add' plugin #9821

Open
eddiew opened this issue Jan 20, 2024 · 0 comments
Open

Support adding file contents via 'add' plugin #9821

eddiew opened this issue Jan 20, 2024 · 0 comments

Comments

@eddiew
Copy link

eddiew commented Jan 20, 2024

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

I use graphql-codegen to write the same type definitions for my db types into a few different dockerized services. Some of these types are user-defined, which i currently specify with the 'add' plugin. However I have to duplicate these definitions for each output file, which is getting to be a little bit annoying to maintain. Plus I don't get syntax highlighting since this "code" is technically a string literal in my config file.

Describe the solution you'd like

A way to specify a file path in the 'add' plugin and have the plugin copy file contents

Describe alternatives you've considered

I tried putting "import * as X from './types'" but I had trouble getting this to work with my docker setup because I need to make the ./types file available to each container.

Currently I duplicate the types that I want to add for each output file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant