Remove treeshake:false, delete dead GraphQL ops, fix broken section-move route#11612
Merged
Conversation
…ove route The treeshake:false workaround was added for a Rolldown bug that no longer exists — verified by checking that all 502 reachable GraphQL operations survive the build with treeshaking enabled. Also found and cleaned up while verifying: 8 unused GraphQL operations (AdminStoreAbilityQuery, MailingListsMenuQuery, WhosFreeFormConventionQuery, 5 Standalone* mutations in StandaloneEditEvent) deleted from source and regenerated. And a genuinely broken feature: MoveFormSection was defined and its action was wired up, but the route was never registered in AppRouter — so section drag-and-drop silently did nothing. Route added. Adds scripts/check-graphql-documents.mts (yarn check-graphql-documents) and a CI job that builds and runs it on every PR to catch future regressions. Also consolidates graphiql/toolkit imports into GraphiQLWithFetcher.tsx so they load as a single lazy chunk. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Code Coverage Report: Only Changed Files listed
Minimum allowed coverage is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
A few things bundled together because they were all found during the same investigation.
treeshake: falseremoved. This workaround was added for a Rolldown bug with GraphQL document constants being silently eliminated. Turns out the bug no longer exists. Verified by writingscripts/check-graphql-documents.mts, which collects all operation names from the source.generated.tsfiles and confirms they survive the build — same 502 operations pass whether treeshaking is on or off.8 dead GraphQL operations deleted. Found them as a byproduct of the check:
AdminStoreAbilityQuery,MailingListsMenuQuery,WhosFreeFormConventionQuery, and fiveStandalone*mutations inStandaloneEditEvent. None of their document constants were imported anywhere. Source.graphqlfiles and generated.tsfiles cleaned up via codegen.Broken section drag-and-drop fixed. While checking
MoveFormSection(also absent from the build), noticed that the route action file existed and was correctly implemented, but the route itself was never registered inAppRouter.tsx. The UI was submitting to/admin_forms/:id/edit/section/:sectionId/moveand silently failing. One missing route entry, now fixed.GraphiQL imports consolidated.
CmsGraphqlQueryFormpreviously had a static import of@graphiql/toolkitalongside its lazy import ofgraphiql. Both now live inGraphiQLWithFetcher.tsx, lazily loaded as a unit.Changes
💻 Engineer-facing
yarn check-graphql-documents— run afteryarn build:webto verify all expected operations are in the output. Fails with a list of anything missing.static.ymlruns the build + check on every PRKNOWN_ABSENTin the script is currently empty — if you add an operation that's intentionally unreachable, add it there🚢
🤖 Generated with Claude Code