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: src/Rebing/GraphQL/Support/UploadType.php
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,6 @@ class UploadType extends ScalarType {
14
14
* @var string
15
15
*/
16
16
public$name = 'Upload';
17
-
18
17
/**
19
18
* @var string
20
19
*/
@@ -50,10 +49,6 @@ public function serialize($value)
50
49
*/
51
50
publicfunctionparseValue($value)
52
51
{
53
-
if (!$valueinstanceof UploadedFile) {
54
-
thrownew \UnexpectedValueException('Could not get uploaded file, be sure to conform to GraphQL multipart request specification. Instead got: ' . Utils::printSafe($value));
55
-
}
56
-
57
52
return$value;
58
53
}
59
54
@@ -68,4 +63,12 @@ public function parseLiteral($valueNode, ?array $variables = NULL)
68
63
{
69
64
thrownewError('`Upload` cannot be hardcoded in query, be sure to conform to GraphQL multipart request specification. Instead got: ' . $valueNode->kind, [$valueNode]);
0 commit comments