Skip to content

Commit c54fd0e

Browse files
authored
fix: normalize the multipart queries closes logaretm#112 (logaretm#113)
1 parent 83c8094 commit c54fd0e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/multipart/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { definePlugin } from 'villus';
22
import { extractFiles } from 'extract-files';
3+
import { normalizeQuery } from '../../shared/src';
34

45
export function multipart() {
56
return definePlugin(function multipartPlugin(context) {
@@ -16,7 +17,7 @@ export function multipart() {
1617
}
1718

1819
const body = new FormData();
19-
body.append('operations', JSON.stringify({ query: operation.query, variables }));
20+
body.append('operations', JSON.stringify({ query: normalizeQuery(operation.query), variables }));
2021

2122
const map: Record<number, string[]> = {};
2223
let i = 0;

0 commit comments

Comments
 (0)