Skip to content

Commit

Permalink
fix: fix files upload remap (#1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
devsergiy authored Jan 19, 2025
1 parent 2365ca3 commit 09a2235
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions v2/pkg/astnormalization/variables_mapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,24 @@ func TestVariablesMapper(t *testing.T) {
"a": "varOne",
},
},
{
name: "13 Mutation with file uploads - reverse order",
input: `
mutation MyMutation($files: [Upload!] $varOne: String!) {
updateObject(name: $varOne, files: $files) {
name
}
}`,
output: `
mutation MyMutation($a: String!, $files: [Upload!]) {
updateObject(name: $a, files: $files) {
name
}
}`,
variablesMapping: map[string]string{
"a": "varOne",
},
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit 09a2235

Please sign in to comment.