Skip to content

@W-23820125 feat: broaden ui-bundle .graphqlrc.yml generation to the angularbasic template - #1032

Open
emanchan wants to merge 1 commit into
salesforcecli:mainfrom
emanchan:emanchan/W-23820125-graphqlrc-angularbasic
Open

@W-23820125 feat: broaden ui-bundle .graphqlrc.yml generation to the angularbasic template#1032
emanchan wants to merge 1 commit into
salesforcecli:mainfrom
emanchan:emanchan/W-23820125-graphqlrc-angularbasic

Conversation

@emanchan

Copy link
Copy Markdown
Contributor

Broadens the ui-bundle generator's project-root .graphqlrc.yml post-step so it also runs for the angularbasic template, not just reactbasic.

@W-23820125

What changed

  • src/commands/template/generate/ui-bundle/index.ts: introduced a TEMPLATES_WITH_GRAPHQL allowlist (reactbasic, angularbasic) and generalized the post-generation condition from flags.template === 'reactbasic' to TEMPLATES_WITH_GRAPHQL.has(flags.template). Angular bundles now get a .graphqlrc.yml written at the sfdx project root (the same behavior already shipped for React), so the GraphQL LSP and lint tooling can auto-discover the schema.
  • test/commands/template/generate/ui-bundle/index.nut.ts: enhanced the angularbasic NUT to assert the project-root .graphqlrc.yml is created (content + the create .graphqlrc.yml log line), is idempotent across a second angular generate, and cleans up between tests.

Why

The angularbasic template in @salesforce/templates already ships a bundle-level .graphqlrc.yml (and a codegen config), but the plugin only created the project-root .graphqlrc.yml for reactbasic. This closes that gap so Angular ui-bundles get the same editor/tooling support as React.

Verification (local)

  • tsc -p . and tsc -p ./test: clean
  • eslint src test: clean
  • ui-bundle NUT suite: 13 passing, including the new "…and create .graphqlrc.yml at the project root" angular case
  • snapshot:compare: no changes detected (command signature unchanged / backward-compatible)
  • commandreference:generate: generates cleanly

🤖 Generated with Claude Code

… template

@W-23820125

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant