-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added support for
nullable
uploads in multipart request
- Loading branch information
Showing
10 changed files
with
1,104 additions
and
269 deletions.
There are no files selected for viewing
412 changes: 412 additions & 0 deletions
412
src/__tests__/requests/__snapshots__/multipartFormData.spec.ts.snap
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/graphql-upload/__tests__/__snapshots__/process-request.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`graphql-upload-spec \`processRequest\` with a missing multipart form field file. 1`] = `"File missing in the request."`; | ||
|
||
exports[`graphql-upload-spec \`processRequest\` with missing graphql document 1`] = `"Missing ‘query’ field on operations."`; |
254 changes: 254 additions & 0 deletions
254
src/graphql-upload/__tests__/__snapshots__/utils.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,254 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`getAllVariablesFromDocuments 1`] = ` | ||
{ | ||
"0.variables.var1": { | ||
"defaultValue": undefined, | ||
"directives": [], | ||
"kind": "VariableDefinition", | ||
"loc": { | ||
"end": 34, | ||
"start": 21, | ||
}, | ||
"type": { | ||
"kind": "NamedType", | ||
"loc": { | ||
"end": 34, | ||
"start": 28, | ||
}, | ||
"name": { | ||
"kind": "Name", | ||
"loc": { | ||
"end": 34, | ||
"start": 28, | ||
}, | ||
"value": "Upload", | ||
}, | ||
}, | ||
"variable": { | ||
"kind": "Variable", | ||
"loc": { | ||
"end": 26, | ||
"start": 21, | ||
}, | ||
"name": { | ||
"kind": "Name", | ||
"loc": { | ||
"end": 26, | ||
"start": 22, | ||
}, | ||
"value": "var1", | ||
}, | ||
}, | ||
}, | ||
"0.variables.var2": { | ||
"defaultValue": undefined, | ||
"directives": [], | ||
"kind": "VariableDefinition", | ||
"loc": { | ||
"end": 50, | ||
"start": 36, | ||
}, | ||
"type": { | ||
"kind": "NonNullType", | ||
"loc": { | ||
"end": 50, | ||
"start": 43, | ||
}, | ||
"type": { | ||
"kind": "NamedType", | ||
"loc": { | ||
"end": 49, | ||
"start": 43, | ||
}, | ||
"name": { | ||
"kind": "Name", | ||
"loc": { | ||
"end": 49, | ||
"start": 43, | ||
}, | ||
"value": "Upload", | ||
}, | ||
}, | ||
}, | ||
"variable": { | ||
"kind": "Variable", | ||
"loc": { | ||
"end": 41, | ||
"start": 36, | ||
}, | ||
"name": { | ||
"kind": "Name", | ||
"loc": { | ||
"end": 41, | ||
"start": 37, | ||
}, | ||
"value": "var2", | ||
}, | ||
}, | ||
}, | ||
"0.variables.var3": { | ||
"defaultValue": undefined, | ||
"directives": [], | ||
"kind": "VariableDefinition", | ||
"loc": { | ||
"end": 65, | ||
"start": 52, | ||
}, | ||
"type": { | ||
"kind": "NamedType", | ||
"loc": { | ||
"end": 65, | ||
"start": 59, | ||
}, | ||
"name": { | ||
"kind": "Name", | ||
"loc": { | ||
"end": 65, | ||
"start": 59, | ||
}, | ||
"value": "Upload", | ||
}, | ||
}, | ||
"variable": { | ||
"kind": "Variable", | ||
"loc": { | ||
"end": 57, | ||
"start": 52, | ||
}, | ||
"name": { | ||
"kind": "Name", | ||
"loc": { | ||
"end": 57, | ||
"start": 53, | ||
}, | ||
"value": "var3", | ||
}, | ||
}, | ||
}, | ||
"1.variables.var1": { | ||
"defaultValue": undefined, | ||
"directives": [], | ||
"kind": "VariableDefinition", | ||
"loc": { | ||
"end": 34, | ||
"start": 21, | ||
}, | ||
"type": { | ||
"kind": "NamedType", | ||
"loc": { | ||
"end": 34, | ||
"start": 28, | ||
}, | ||
"name": { | ||
"kind": "Name", | ||
"loc": { | ||
"end": 34, | ||
"start": 28, | ||
}, | ||
"value": "Upload", | ||
}, | ||
}, | ||
"variable": { | ||
"kind": "Variable", | ||
"loc": { | ||
"end": 26, | ||
"start": 21, | ||
}, | ||
"name": { | ||
"kind": "Name", | ||
"loc": { | ||
"end": 26, | ||
"start": 22, | ||
}, | ||
"value": "var1", | ||
}, | ||
}, | ||
}, | ||
"1.variables.var2": { | ||
"defaultValue": undefined, | ||
"directives": [], | ||
"kind": "VariableDefinition", | ||
"loc": { | ||
"end": 50, | ||
"start": 36, | ||
}, | ||
"type": { | ||
"kind": "NonNullType", | ||
"loc": { | ||
"end": 50, | ||
"start": 43, | ||
}, | ||
"type": { | ||
"kind": "NamedType", | ||
"loc": { | ||
"end": 49, | ||
"start": 43, | ||
}, | ||
"name": { | ||
"kind": "Name", | ||
"loc": { | ||
"end": 49, | ||
"start": 43, | ||
}, | ||
"value": "Upload", | ||
}, | ||
}, | ||
}, | ||
"variable": { | ||
"kind": "Variable", | ||
"loc": { | ||
"end": 41, | ||
"start": 36, | ||
}, | ||
"name": { | ||
"kind": "Name", | ||
"loc": { | ||
"end": 41, | ||
"start": 37, | ||
}, | ||
"value": "var2", | ||
}, | ||
}, | ||
}, | ||
"1.variables.var3": { | ||
"defaultValue": undefined, | ||
"directives": [], | ||
"kind": "VariableDefinition", | ||
"loc": { | ||
"end": 65, | ||
"start": 52, | ||
}, | ||
"type": { | ||
"kind": "NamedType", | ||
"loc": { | ||
"end": 65, | ||
"start": 59, | ||
}, | ||
"name": { | ||
"kind": "Name", | ||
"loc": { | ||
"end": 65, | ||
"start": 59, | ||
}, | ||
"value": "Upload", | ||
}, | ||
}, | ||
"variable": { | ||
"kind": "Variable", | ||
"loc": { | ||
"end": 57, | ||
"start": 52, | ||
}, | ||
"name": { | ||
"kind": "Name", | ||
"loc": { | ||
"end": 57, | ||
"start": 53, | ||
}, | ||
"value": "var3", | ||
}, | ||
}, | ||
}, | ||
} | ||
`; |
Oops, something went wrong.