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

[Improvement] Improved generate-graphql-types script #40

Merged

Conversation

OustanDing
Copy link
Member

@OustanDing OustanDing commented Jul 28, 2021

Notion ticket link

Ticket

Implementation description

  • Output errors to stdout
  • Create a backup types-backup.ts file before deleting types.ts. If execution fails, restore the types.ts file using the backup file. This eliminates the cycle that arose from deleting types.ts unconditionally, which disabled the app from running, which in turn meant that we could not generate GraphQL types.
  • Added lib/graphql/types.ts to .prettierignore so that we don't accidentally make changes to it

Notes

  • QOL change :))

Checklist

  • My PR name is descriptive, is in imperative tense and starts with one of the following: [Feature],[Improvement] or [Fix],
  • I have run the appropriate linter(s)
  • I have requested a review from the RCD team on GitHub, or specific people who are associated with this ticket

@OustanDing OustanDing requested a review from a team July 28, 2021 02:58
@OustanDing OustanDing added the needs dev review Needs dev review label Jul 28, 2021
@railway-app
Copy link

railway-app bot commented Jul 28, 2021

This PR is being deployed to Railway 🚅

Live → richmond-centre-for-disability-pr-40.up.railway.app

[View Deployment]

@OustanDing OustanDing force-pushed the od/improvement/improve-generate-graphql-types-script branch from 5ec1ff2 to 44cb093 Compare July 29, 2021 17:09
lib/scripts/generate-graphql-types.js Outdated Show resolved Hide resolved
lib/graphql/types.ts Show resolved Hide resolved
@OustanDing OustanDing merged commit b8f2535 into staging Jul 30, 2021
@OustanDing OustanDing deleted the od/improvement/improve-generate-graphql-types-script branch July 30, 2021 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs dev review Needs dev review
Projects
None yet
3 participants