Skip to content

Fix ambiguous GraphQL variable placeholder in mutation template#5327

Draft
Copilot wants to merge 2 commits intocom-2900/add-crud-skillsfrom
copilot/sub-pr-5323
Draft

Fix ambiguous GraphQL variable placeholder in mutation template#5327
Copilot wants to merge 2 commits intocom-2900/add-crud-skillsfrom
copilot/sub-pr-5323

Conversation

Copy link
Contributor

Copilot AI commented Mar 16, 2026

The mutation template in enum-02-editable-chip.md used ${enumFieldName} for GraphQL variable references, which is visually ambiguous — it reads like a JS template literal where the entire ${enumFieldName} token gets replaced by status, dropping the $ prefix and producing invalid GraphQL.

Change

  • enum-02-editable-chip.md: Changed ${enumFieldName}{$enumFieldName} in both the variable declaration and input reference of the mutation template

The {$enumFieldName} placeholder follows the file's existing {placeholder} convention with $ embedded, making it unambiguous that the expansion includes the GraphQL variable prefix:

# Before (ambiguous — ${...} looks like a single replaceable token)
mutation Update{EntityName}{EnumName}($id: ID!, ${enumFieldName}: {EnumName}!) {
    {updateMutation}(id: $id, input: { {enumFieldName}: ${enumFieldName} }) {

# After (clear — {$enumFieldName} expands to $status, {enumFieldName} expands to status)
mutation Update{EntityName}{EnumName}($id: ID!, {$enumFieldName}: {EnumName}!) {
    {updateMutation}(id: $id, input: { {enumFieldName}: {$enumFieldName} }) {

This matches the concrete example already present in the file ($status: LocationStatus! / input: { status: $status }).


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Co-authored-by: manuelblum <6098356+manuelblum@users.noreply.github.com>
Copilot AI changed the title [WIP] [WIP] Address feedback on 'add comet-crud Agent skills' PR Fix ambiguous GraphQL variable placeholder in mutation template Mar 16, 2026
Copilot AI requested a review from manuelblum March 16, 2026 20:04
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.

2 participants