Skip to content

Commit c731a53

Browse files
add note about matching name of the field
1 parent f3b4e48 commit c731a53

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/source/mutations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ If you wanted to use this to upload a file called `a.txt`, it would look somethi
127127
guard
128128
let fileURL = Bundle.main.url(forResource: "a",
129129
withExtension: "txt"),
130-
let file = GraphQLFile(fieldName: "file",
130+
let file = GraphQLFile(fieldName: "file", // Must be the name of the field the file is being uploaded to
131131
originalName: "a.txt",
132132
mimeType: "text/plain", // <-defaults to "application/octet-stream"
133133
fileURL: fileURL) else {

0 commit comments

Comments
 (0)