graphql-upload-nextjs 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.d.ts +8 -2
- package/package.json +12 -8
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ A [GraphQL multipart request spec](https://github.com/jaydenseric/graphql-multip
|
|
|
24
24
|
## Installation
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
npm install graphql-upload-nextjs
|
|
27
|
+
npm install graphql-upload-nextjs @apollo/server @as-integrations/next graphql next
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
## Migrating from graphql-upload
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { GraphQLResponse } from '@apollo/server';
|
|
2
1
|
import { GraphQLScalarType } from 'graphql';
|
|
3
2
|
import { NextResponse } from 'next/server.js';
|
|
4
3
|
/** Represents a processed file with metadata and stream access. */
|
|
@@ -32,6 +31,13 @@ interface ServerExecuteOperationParams {
|
|
|
32
31
|
query: string;
|
|
33
32
|
variables: Record<string, unknown>;
|
|
34
33
|
}
|
|
34
|
+
/** Minimal response shape consumed from Apollo Server executeOperation. */
|
|
35
|
+
interface ServerExecuteOperationResponse {
|
|
36
|
+
body: {
|
|
37
|
+
kind: string;
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
35
41
|
/**
|
|
36
42
|
* Represents an instance of a file upload.
|
|
37
43
|
* Holds a promise that resolves with the file details once processed.
|
|
@@ -61,7 +67,7 @@ export declare function validateMap(map: Record<string, unknown>): string | null
|
|
|
61
67
|
export declare function uploadProcess<TContext extends Record<string, unknown>>(request: MinimalRequest, contextValueInput: TContext, server: {
|
|
62
68
|
executeOperation: (params: ServerExecuteOperationParams, context: {
|
|
63
69
|
contextValue: TContext;
|
|
64
|
-
}) => Promise<
|
|
70
|
+
}) => Promise<ServerExecuteOperationResponse>;
|
|
65
71
|
}, settings?: {
|
|
66
72
|
allowedTypes?: string[];
|
|
67
73
|
maxFileSize?: number;
|
package/package.json
CHANGED
|
@@ -7,22 +7,21 @@
|
|
|
7
7
|
"url": "https://github.com/lafittemehdy/graphql-upload-nextjs/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@apollo/server": "^5.5.1",
|
|
11
10
|
"file-type": "^22.0.1",
|
|
12
|
-
"
|
|
13
|
-
"istextorbinary": "^9.5.0",
|
|
14
|
-
"next": "^16.2.6"
|
|
11
|
+
"istextorbinary": "^9.5.0"
|
|
15
12
|
},
|
|
16
13
|
"description": "The middleware and Upload scalar in this package enable GraphQL multipart requests (file uploads via queries and mutations) in your Apollo Server Next.js integration.",
|
|
17
14
|
"devDependencies": {
|
|
18
15
|
"@types/jest": "^30.0.0",
|
|
19
|
-
"@types/node": "^25.9.
|
|
16
|
+
"@types/node": "^25.9.2",
|
|
17
|
+
"graphql": "^16.14.1",
|
|
20
18
|
"husky": "^9.1.7",
|
|
21
19
|
"jest": "^30.4.2",
|
|
20
|
+
"next": "^16.2.7",
|
|
22
21
|
"nodemon": "^3.1.14",
|
|
23
|
-
"ts-jest": "^29.4.
|
|
22
|
+
"ts-jest": "^29.4.11",
|
|
24
23
|
"typescript": "^6.0.3",
|
|
25
|
-
"undici": "^8.
|
|
24
|
+
"undici": "^8.4.1"
|
|
26
25
|
},
|
|
27
26
|
"files": [
|
|
28
27
|
"CODE_OF_CONDUCT.md",
|
|
@@ -56,6 +55,11 @@
|
|
|
56
55
|
"postcss": "8.5.14"
|
|
57
56
|
},
|
|
58
57
|
"packageManager": "npm@10.9.3",
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"@apollo/server": "^5.0.0",
|
|
60
|
+
"graphql": "^16.0.0",
|
|
61
|
+
"next": "^16.0.0"
|
|
62
|
+
},
|
|
59
63
|
"publishConfig": {
|
|
60
64
|
"access": "public",
|
|
61
65
|
"provenance": true
|
|
@@ -74,5 +78,5 @@
|
|
|
74
78
|
},
|
|
75
79
|
"type": "module",
|
|
76
80
|
"types": "index.d.ts",
|
|
77
|
-
"version": "2.0.
|
|
81
|
+
"version": "2.0.3"
|
|
78
82
|
}
|