Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ inputs:
node-version:
description: Node.js version
required: true
default: 20.4.0
default: 21.6.2

pnpm-version:
description: pnpm version
required: true
default: 8.7.4
default: 8.15.3

runs:
using: 'composite'
Expand Down
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodejs 21.6.2
pnpm 8.15.3
56 changes: 25 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@commitlint/config-conventional": "^17.7.0",
"@commitlint/config-nx-scopes": "^17.6.4",
"@deepkit-modules/nx-webpack-plugin": "^0.2.12",
"@deepkit/postgres": "1.0.1-alpha.113",
"@deepkit/postgres": "1.0.1-alpha.142",
"@deepkit/type-compiler": "1.0.1-alpha.112",
"@graphql-tools/schema": "^10.0.2",
"@nx/devkit": "^16.8.0",
Expand Down Expand Up @@ -49,51 +49,45 @@
"ts-jest": "^29.1.0",
"ts-node": "10.9.1",
"type-fest": "^4.3.1",
"typescript": "5.2.2",
"typescript": "5.4.2",
"verdaccio": "^5.0.4"
},
"dependencies": {
"@apollo/server": "4.9.3",
"@apollo/subgraph": "^2.7.1",
"@deepkit/app": "1.0.1-alpha.113",
"@deepkit/broker": "1.0.1-alpha.113",
"@deepkit/bson": "1.0.1-alpha.113",
"@deepkit/core": "1.0.1-alpha.113",
"@deepkit/core-rxjs": "1.0.1-alpha.113",
"@deepkit/event": "1.0.1-alpha.113",
"@deepkit/filesystem": "1.0.1-alpha.113",
"@deepkit/framework": "1.0.1-alpha.113",
"@deepkit/http": "1.0.1-alpha.113",
"@deepkit/injector": "1.0.1-alpha.113",
"@deepkit/logger": "1.0.1-alpha.113",
"@deepkit/orm": "~1.0.1-alpha.113",
"@deepkit/rpc": "~1.0.1-alpha.113",
"@deepkit/rpc-tcp": "1.0.1-alpha.113",
"@deepkit/sql": "1.0.1-alpha.113",
"@deepkit/stopwatch": "1.0.1-alpha.113",
"@deepkit/template": "1.0.1-alpha.113",
"@deepkit/type": "1.0.1-alpha.113",
"@deepkit/workflow": "1.0.1-alpha.113",
"@deepkit/app": "^1.0.1-alpha.142",
"@deepkit/broker": "1.0.1-alpha.142",
"@deepkit/bson": "1.0.1-alpha.142",
"@deepkit/core": "1.0.1-alpha.124",
"@deepkit/core-rxjs": "1.0.1-alpha.124",
"@deepkit/event": "1.0.1-alpha.142",
"@deepkit/filesystem": "1.0.1-alpha.124",
"@deepkit/framework": "1.0.1-alpha.142",
"@deepkit/http": "1.0.1-alpha.142",
"@deepkit/injector": "1.0.1-alpha.142",
"@deepkit/logger": "1.0.1-alpha.142",
"@deepkit/orm": "~1.0.1-alpha.142",
"@deepkit/rpc": "~1.0.1-alpha.142",
"@deepkit/rpc-tcp": "1.0.1-alpha.142",
"@deepkit/sql": "1.0.1-alpha.142",
"@deepkit/stopwatch": "1.0.1-alpha.142",
"@deepkit/template": "1.0.1-alpha.142",
"@deepkit/type": "1.0.1-alpha.142",
"@deepkit/workflow": "1.0.1-alpha.142",
"@graphql-tools/utils": "^10.0.8",
"graphql": "^16.8.0",
"graphql": "16.8.1",
"graphql-request": "^6.1.0",
"graphql-scalars": "^1.22.2",
"graphql-yoga": "^5.0.0",
"radash": "^11.0.0",
"rxjs": "^7.8.1",
"tslib": "2.6.2"
},
"packageManager": "pnpm@8.7.4",
"volta": {
"pnpm": "8.7.4",
"node": "20.4.0"
"engines": {
"node": "21.6.2",
"pnpm": "8.15.3"
},
"nx": {
"includedScripts": []
},
"pnpm": {
"patchedDependencies": {
"typescript@5.2.2": "patches/typescript@5.2.2.patch"
}
}
}
10 changes: 5 additions & 5 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"peerDependencies": {
"graphql": "^16.8.0",
"@graphql-tools/utils": "^10.0.8",
"@deepkit/core": "^1.0.1-alpha.113",
"@deepkit/http": "^1.0.1-alpha.113",
"@deepkit/type": "^1.0.1-alpha.113",
"@deepkit/broker": "^1.0.1-alpha.113",
"@deepkit/injector": "^1.0.1-alpha.113",
"@deepkit/core": "^1.0.1-alpha.124",
"@deepkit/http": "^1.0.1-alpha.142",
"@deepkit/type": "^1.0.1-alpha.142",
"@deepkit/broker": "^1.0.1-alpha.142",
"@deepkit/injector": "^1.0.1-alpha.142",
"rxjs": "^7.8.1"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/lib/types-builder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ describe('TypesBuilder', () => {

const asyncIterator = asyncIterable[Symbol.asyncIterator]();

const message = { type: 'user-created', id: uuid() };
const message = { type: 'user-created', id: uuid() } as const;

await channel.publish(message);

Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/lib/types-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ import {
getTypeName,
hasDecorator,
isAsyncIterable,
isParameterNullable,
isPropertyOrParameterNullable,
maybeUnwrapPromiseLikeType,
maybeUnwrapSubscriptionReturnType,
requireTypeName,
Expand Down Expand Up @@ -726,7 +726,7 @@ export class TypesBuilder {

return argsParameters.reduce((args, parameter) => {
let type = this.createInputType(parameter.type);
if (!isParameterNullable(parameter)) {
if (!isPropertyOrParameterNullable(parameter)) {
type = new GraphQLNonNull(type);
}

Expand All @@ -746,7 +746,7 @@ export class TypesBuilder {
return Object.fromEntries(
reflectionClass.getProperties().map(property => {
let type = this.createOutputType(property.type);
if (!property.isOptional() && !property.isNullable()) {
if (!isPropertyOrParameterNullable(property)) {
type = new GraphQLNonNull(type);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function filterReflectionParametersMetaAnnotationsForArguments(
return argsParameters;
}

export function isParameterNullable(parameter: ReflectionParameter): boolean {
export function isPropertyOrParameterNullable(parameter: ReflectionProperty | ReflectionParameter): boolean {
return parameter.isOptional() || isNullable(parameter.type);
}

Expand Down
Loading