Skip to content

Commit ebad66f

Browse files
Update to TS SDK v5, support biginteger representation (#35)
1 parent 702a95e commit ebad66f

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ This changelog documents the changes between release versions.
88
Changes to be included in the next upcoming release
99

1010
- Added a default .gitignore that ignores node_modules in the connector template ([#34](https://github.com/hasura/ndc-nodejs-lambda/pull/34))
11+
- Updated to NDC TypeScript SDK to v5.0.0 ([#35](https://github.com/hasura/ndc-nodejs-lambda/pull/35))
12+
- The BigInt scalar type now uses the biginteger type representation
1113

1214
## [1.4.0] - 2024-05-08
1315
- Removed type inference recursion limit ([#33](https://github.com/hasura/ndc-nodejs-lambda/pull/33)). This enables the use of very nested object graphs.

ndc-lambda-sdk/package-lock.json

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

ndc-lambda-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"url": "git+https://github.com/hasura/ndc-nodejs-lambda.git"
3131
},
3232
"dependencies": {
33-
"@hasura/ndc-sdk-typescript": "^4.6.0",
33+
"@hasura/ndc-sdk-typescript": "^5.0.0",
3434
"@tsconfig/node20": "^20.1.3",
3535
"commander": "^11.1.0",
3636
"cross-spawn": "^7.0.3",

ndc-lambda-sdk/src/connector.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ export function createConnector(options: ConnectorOptions): sdk.Connector<Config
6767

6868
getCapabilities: function (configuration: Configuration): sdk.CapabilitiesResponse {
6969
return {
70-
version: "0.1.2",
70+
version: "0.1.3",
7171
capabilities: {
7272
query: {
73-
variables: {}
73+
variables: {},
74+
nested_fields: {},
7475
},
7576
mutation: {},
7677
}

ndc-lambda-sdk/src/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ function convertBuiltInScalarTypeIntoSdkSchemaType(typeName: BuiltInScalarTypeNa
298298
comparison_operators: { "_eq": { type: "equal" } },
299299
};
300300
case BuiltInScalarTypeName.BigInt: return {
301-
representation: { type: "int64" }, // NDC doesn't have a good representation for this type as at v0.1.2, so this is the best representation in the meantime
301+
representation: { type: "biginteger" },
302302
aggregate_functions: {},
303303
comparison_operators: { "_eq": { type: "equal" } },
304304
};

ndc-lambda-sdk/test/schema/ndc-schema.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ describe("ndc schema", function() {
233233
}
234234
},
235235
"BigInt": {
236-
representation: { type: "int64" },
236+
representation: { type: "biginteger" },
237237
aggregate_functions: {},
238238
comparison_operators: {
239239
"_eq": { type: "equal" }

0 commit comments

Comments
 (0)