1
0
mirror of synced 2025-12-30 03:01:36 -05:00

remove = from mutation ids to avoid graphql parse error (#21394)

This commit is contained in:
Sarah Edwards
2021-09-10 10:11:31 -07:00
committed by GitHub
parent dd0aa96918
commit e15ddfd1ed

View File

@@ -161,8 +161,10 @@ export function generateUpdateProjectNextItemFieldMutation({
function generateMutationToUpdateField({ item, fieldID, value, literal = false }) {
const parsedValue = literal ? `value: "${value}"` : `value: ${value}`
// Strip "=" out of the item ID when creating the mutation ID to avoid a GraphQL parsing error
// (statistically, this should still give us a unique mutation ID)
return `
set_${fieldID.substr(1)}_item_${item}: updateProjectNextItemField(input: {
set_${fieldID.substr(1)}_item_${item.replaceAll('=', '')}: updateProjectNextItemField(input: {
projectId: $project
itemId: "${item}"
fieldId: ${fieldID}