Skip to content

Commit

Permalink
chore(deps): update whatwg-node (#2392)
Browse files Browse the repository at this point in the history
* chore(deps): update whatwg-node

* chore(dependencies): updated changesets for modified dependencies

* Disable logging and do not calculate content-length here

* chore(dependencies): updated changesets for modified dependencies

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
  • Loading branch information
3 people committed Feb 6, 2023
1 parent ac42194 commit 1caac99
Show file tree
Hide file tree
Showing 12 changed files with 88 additions and 47 deletions.
6 changes: 6 additions & 0 deletions .changeset/graphql-yoga-2392-dependencies.md
@@ -0,0 +1,6 @@
---
'graphql-yoga': patch
---
dependencies updates:
- Updated dependency [`@whatwg-node/fetch@0.6.8` 鈫楋笌](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.6.8) (from `0.6.5`, in `dependencies`)
- Updated dependency [`@whatwg-node/server@0.6.3` 鈫楋笌](https://www.npmjs.com/package/@whatwg-node/server/v/0.6.3) (from `0.5.11`, in `dependencies`)
2 changes: 1 addition & 1 deletion examples/bun/package.json
Expand Up @@ -12,6 +12,6 @@
"graphql": "16.6.0"
},
"devDependencies": {
"@whatwg-node/fetch": "0.6.5"
"@whatwg-node/fetch": "0.6.8"
}
}
2 changes: 1 addition & 1 deletion examples/error-handling/package.json
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"graphql-yoga": "3.5.1",
"@whatwg-node/fetch": "0.6.5",
"@whatwg-node/fetch": "0.6.8",
"graphql": "^16.1.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/uwebsockets/package.json
Expand Up @@ -16,7 +16,7 @@
"uWebSockets.js": "uNetworking/uWebSockets.js#v20.15.0"
},
"devDependencies": {
"@whatwg-node/fetch": "0.6.5",
"@whatwg-node/fetch": "0.6.8",
"@types/ws": "8.5.4",
"ws": "8.12.0"
}
Expand Down
2 changes: 2 additions & 0 deletions packages/graphql-yoga/__tests__/graphql-over-http.spec.ts
Expand Up @@ -25,6 +25,7 @@ describe('GraphQL over HTTP', () => {
},
},
}),
logging: false,
})

const result = await yoga.fetch('http://yoga/graphql', {
Expand Down Expand Up @@ -66,6 +67,7 @@ describe('GraphQL over HTTP', () => {
},
},
}),
logging: false,
})

const result = await yoga.fetch('http://yoga/graphql', {
Expand Down
4 changes: 3 additions & 1 deletion packages/graphql-yoga/__tests__/schema.spec.ts
Expand Up @@ -5,7 +5,9 @@ import { createSchema, createYoga, YogaInitialContext } from '../src/index.js'

describe('schema', () => {
it('missing schema causes a error', async () => {
const yoga = createYoga({})
const yoga = createYoga({
logging: false,
})

const response = await yoga.fetch('http://yoga/graphql', {
method: 'POST',
Expand Down
4 changes: 2 additions & 2 deletions packages/graphql-yoga/package.json
Expand Up @@ -56,8 +56,8 @@
"@graphql-tools/schema": "^9.0.0",
"@graphql-tools/utils": "^9.0.1",
"@graphql-yoga/subscription": "^3.1.0",
"@whatwg-node/fetch": "0.6.5",
"@whatwg-node/server": "0.5.11",
"@whatwg-node/fetch": "0.6.8",
"@whatwg-node/server": "0.6.3",
"dset": "^3.1.1",
"tslib": "^2.3.1"
},
Expand Down
6 changes: 1 addition & 5 deletions packages/graphql-yoga/src/plugins/resultProcessor/regular.ts
Expand Up @@ -31,11 +31,7 @@ export function processRegularResult(
acceptedHeader === 'application/json',
)

const textEncoder = new fetchAPI.TextEncoder()
const responseBody = jsonStringifyResult(executionResult)
const decodedString = textEncoder.encode(responseBody)

headersInit['Content-Length'] = decodedString.byteLength.toString()

return new fetchAPI.Response(decodedString, responseInit)
return new fetchAPI.Response(responseBody, responseInit)
}
Expand Up @@ -415,6 +415,7 @@ describe('Inline Trace', () => {
createGraphQLError('bim', { extensions: { str: 'ing' } }),
}),
],
logging: false,
})

const response = await yoga.fetch('http://yoga/graphql', {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/apollo-inline-trace/package.json
Expand Up @@ -52,7 +52,7 @@
},
"devDependencies": {
"@envelop/on-resolve": "2.0.4",
"@whatwg-node/fetch": "0.6.5",
"@whatwg-node/fetch": "0.6.8",
"graphql-yoga": "3.5.1"
}
}
2 changes: 1 addition & 1 deletion packages/plugins/defer-stream/package.json
Expand Up @@ -45,7 +45,7 @@
},
"devDependencies": {
"@graphql-tools/executor-http": "0.1.4",
"@whatwg-node/fetch": "0.6.5"
"@whatwg-node/fetch": "0.6.8"
},
"type": "module",
"dependencies": {
Expand Down

0 comments on commit 1caac99

Please sign in to comment.