Skip to content

Commit 0f0ec52

Browse files
committed
no multipart
1 parent 11102c6 commit 0f0ec52

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

packages/web/docs/src/content/migration-guides/gateway-v1-v2.mdx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ instructions to ensure a smooth transition.
99
v2 includes several breaking changes and improvements over v1. The most significant changes are:
1010

1111
- [Drop Support for Node v18](#drop-support-for-node-v18)
12+
- [Multipart Requests are Disabled by Default](#drop-support-for-node-v18)
1213
- [Disabled Automatic Forking](#disabled-automatic-forking)
1314
- [New Hive Logger for next-level observability and debugging](#hive-logger)
1415

@@ -46,6 +47,24 @@ The following packages have been updated to their latest versions, which require
4647
- `@graphql-tools/stitch`
4748
- `@graphql-tools/wrap`
4849

50+
## Multipart Requests are Disabled by Default
51+
52+
The only objective of
53+
[GraphQL multipart request spec](https://github.com/jaydenseric/graphql-multipart-request-spec) is
54+
to support file uploads; however, file uploads are not native to GraphQL and are generally
55+
considered an anti-pattern.
56+
57+
To enable file uploads, you need to explicitly enable the multipart support by setting the
58+
`multipart` Hive Gateway option to `true`.
59+
60+
```diff filename="gateway.config.ts"
61+
import { defineConfig } from '@graphql-hive/gateway';
62+
63+
export const gatewayConfig = defineConfig({
64+
+ multipart: true,
65+
});
66+
```
67+
4968
## Disabled Automatic Forking
5069

5170
We were previously forking workers automatically in v1 when detecting `NODE_ENV=production`;

0 commit comments

Comments
 (0)