You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/Apollo/GraphQLFile.swift
+30-15Lines changed: 30 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,20 @@ public struct GraphQLFile {
8
8
publicletdata:Data?
9
9
publicletfileURL:URL?
10
10
publicletcontentLength:UInt64
11
+
12
+
publicenumGraphQLFileError:Error,LocalizedError{
13
+
case couldNotCreateInputStream
14
+
case couldNotGetFileSize(fileURL:URL)
15
+
16
+
publicvarerrorDescription:String?{
17
+
switchself{
18
+
case.couldNotCreateInputStream:
19
+
return"An input stream could not be created from either the passed-in file URL or data. Please check that you've passed at least one of these, and that for files you have proper permission to stream data."
20
+
case.couldNotGetFileSize(let fileURL):
21
+
return"Apollo could not get the file size for the file at \(fileURL). This likely indicates either a) The file is not at that URL or b) a permissions issue."
22
+
}
23
+
}
24
+
}
11
25
12
26
/// A convenience constant for declaring your mimetype is octet-stream.
0 commit comments