wunderio / next-drupal-starterkit

Next.js for Drupal multilingual template by Wunder
https://next-drupal-starterkit.dev.wdr.io
GNU General Public License v2.0
92 stars 17 forks source link

Run graphql-codegen with build/dev scripts, rather than committing the result #228

Closed joshua-scott closed 5 months ago

joshua-scott commented 5 months ago

Link to feature environment:

Drupal Next.js Storybook

Changes proposed in this PR:

Note that this PR branches from #227, which branches from #226, so if possible it makes sense to merge these PRs in the order they were created.

Currently, we expect developers to run the graphql-codegen step locally and commit the resulting files. However, we have found in other projects that this approach has its downsides:

See relevant commits for more details:

How to test:

  1. Checkout this branch, run the usual ./setup.sh -c
  2. Run lando npm run dev and change some graphql things (fragments/queries etc), does it work like you'd expect (i.e. changes are updated as you make them)?
  3. Check the Next.js feature env and build logs, any surprises there?