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

Copy fragments from build files to ease up developing #5728

Closed
m-allanson opened this issue Jun 5, 2018 · 2 comments
Closed

Copy fragments from build files to ease up developing #5728

m-allanson opened this issue Jun 5, 2018 · 2 comments
Labels
help wanted Issue with a clear description that the community can help with. type: bug An issue or pull request relating to a bug in Gatsby

Comments

@m-allanson
Copy link
Contributor

Description

When changing Gatsby's GraphQL fragments and testing these changes using gatsby-dev-cli, the changed fragments need to be manually copied from Gatsby's src directories. This should be done automatically.

Note that this is a fairly rare bug that can be worked around. It'd be nice to fix but it's not essential as it only affects people editing Gatsby's built in GraphQL fragments.

Refs: #5698
Refs: #5659 (comment)

Steps to reproduce

  • Set up a Gatsby dev environment
  • Change the GraphQL fragments in a Gatsby plugin, e.g. gatsby-transformer-sharp/src/fragments.js
  • Run gatsby-dev to use your modified Gatsby on a test site
  • Note that the fragments have not been updated in your test site

Steps to fix manually

  • Manually copy from /projects/gatsby-repo/packages/gatsby-transformer-sharp/src/fragments.js to /projects/gatsby-test-site/node_modules/gatsby-transformer-sharp/src/fragments.js
  • Delete your site's .cache directory
  • Run gatsby develop and note that the correct fragments are now being used

Expected result

The fragments should be updated automatically.

Actual result

The fragments have to be updated manually.

@m-allanson m-allanson added type: bug An issue or pull request relating to a bug in Gatsby help wanted Issue with a clear description that the community can help with. labels Jun 5, 2018
@KyleAMathews
Copy link
Contributor

This would be nice but probably there's higher priorities. Closing until it comes up again.

@axe312ger
Copy link
Collaborator

😿

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issue with a clear description that the community can help with. type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

3 participants