Skip to content

Commit 7a83402

Browse files
authored
feat: use WithRequired from @apollo/utils.withrequired (#12)
* feat: use WithRequired from @apollo/utils.withrequired * make `@apollo/utils.withrequired` a dependency
1 parent 6907a36 commit 7a83402

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@
4545
"optional": true
4646
}
4747
},
48+
"dependencies": {
49+
"@apollo/utils.withrequired": "^3.0.0"
50+
},
4851
"devDependencies": {
4952
"@apollo/server": "4.11.3",
5053
"@apollo/server-integration-testsuite": "4.11.3",
51-
"@apollo/utils.withrequired": "3.0.0",
5254
"@graphql-tools/schema": "10.0.21",
5355
"@jest/globals": "29.7.0",
5456
"@typescript-eslint/parser": "8.26.0",

pnpm-lock.yaml

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ import {
1717
readBody,
1818
RequestHeaders,
1919
} from 'h3'
20+
import type { WithRequired } from '@apollo/utils.withrequired'
2021
export {
2122
defineGraphqlWebSocket,
2223
defineGraphqlWebSocketHandler,
2324
} from './websocket'
2425

25-
type WithRequired<T, K extends keyof T> = T & Required<Pick<T, K>>
2626
export interface H3ContextFunctionArgument {
2727
event: H3Event
2828
}

0 commit comments

Comments
 (0)