File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 9
9
- Renamed the ` File ` input type ` Upload ` for clarity.
10
10
- Wording and formatting improvements.
11
11
- Covered React Native.
12
+ - Documented custom middleware.
12
13
13
14
## 2.0.2
14
15
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ npm install apollo-upload-server
21
21
22
22
Add the server middleware just before [ graphql-server] ( https://github.com/apollographql/graphql-server ) .
23
23
24
- For [ Express] ( http://expressjs.com ) :
24
+ #### [ Express] ( http://expressjs.com )
25
25
26
26
``` js
27
27
import { apolloUploadExpress } from ' apollo-upload-server'
@@ -41,7 +41,7 @@ app.use(
41
41
// ✂
42
42
```
43
43
44
- For [ Koa] ( http://koajs.com ) :
44
+ #### [ Koa] ( http://koajs.com )
45
45
46
46
``` js
47
47
import { apolloUploadKoa } from ' apollo-upload-server'
@@ -60,6 +60,14 @@ router.post(
60
60
// ✂
61
61
```
62
62
63
+ #### Custom middleware
64
+
65
+ If the middleware you need is not available, import the asynchronous function ` processRequest ` to make your own:
66
+
67
+ ``` js
68
+ import { processRequest } from ' apollo-upload-server'
69
+ ```
70
+
63
71
### GraphQL schema
64
72
65
73
Add an input type for uploads to your schema. You can name it anything but it must have this shape:
You can’t perform that action at this time.
0 commit comments