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

Compilation does not copy the graphql files #135

Closed
phunguyen19 opened this issue Mar 2, 2019 · 4 comments
Closed

Compilation does not copy the graphql files #135

phunguyen19 opened this issue Mar 2, 2019 · 4 comments

Comments

@phunguyen19
Copy link

I'm submitting a...


[ ] Regression 
[ ] Bug report
[x] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

The compilation does not copy or compile the .graphql files inside the src/ folder to dist/ folder. Developer have to manually write custom script or using gulp.

What is the motivation / use case for changing the behavior?

We already have the config of typePaths in GraphQLModule, it would be nice if the compilation can automatically copy or compile the .graphql files also.

@kamilmysliwiec
Copy link
Member

kamilmysliwiec commented Mar 5, 2019

We don't have a dedicated compiler - just a basic TypeScript compilation is being used. In order to automatically copy your .graphql files, I'd recommend writing a small script (using cpx or gulp or whatever) :) Then, simply define your pre: (or post:) script in your package.json file.

@biels
Copy link

biels commented Mar 5, 2019

You could use a build script similar to the following one using copyfiles:
rm -rf dist && tsc -p tsconfig.build.json && copyfiles *.graphql dist/

@phunguyen19
Copy link
Author

You could use a build script similar to the following one using copyfiles:
rm -rf dist && tsc -p tsconfig.build.json && copyfiles *.graphql dist/

Nice package copyfiles . Thanks @biels .

@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants