Skip to content

Commit

Permalink
Update to TS SDK v5, support biginteger representation (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-chambers authored May 31, 2024
1 parent 702a95e commit ebad66f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ This changelog documents the changes between release versions.
Changes to be included in the next upcoming release

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

## [1.4.0] - 2024-05-08
- Removed type inference recursion limit ([#33](https://github.com/hasura/ndc-nodejs-lambda/pull/33)). This enables the use of very nested object graphs.
Expand Down
8 changes: 4 additions & 4 deletions ndc-lambda-sdk/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ndc-lambda-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"url": "git+https://github.com/hasura/ndc-nodejs-lambda.git"
},
"dependencies": {
"@hasura/ndc-sdk-typescript": "^4.6.0",
"@hasura/ndc-sdk-typescript": "^5.0.0",
"@tsconfig/node20": "^20.1.3",
"commander": "^11.1.0",
"cross-spawn": "^7.0.3",
Expand Down
5 changes: 3 additions & 2 deletions ndc-lambda-sdk/src/connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ export function createConnector(options: ConnectorOptions): sdk.Connector<Config

getCapabilities: function (configuration: Configuration): sdk.CapabilitiesResponse {
return {
version: "0.1.2",
version: "0.1.3",
capabilities: {
query: {
variables: {}
variables: {},
nested_fields: {},
},
mutation: {},
}
Expand Down
2 changes: 1 addition & 1 deletion ndc-lambda-sdk/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ function convertBuiltInScalarTypeIntoSdkSchemaType(typeName: BuiltInScalarTypeNa
comparison_operators: { "_eq": { type: "equal" } },
};
case BuiltInScalarTypeName.BigInt: return {
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
representation: { type: "biginteger" },
aggregate_functions: {},
comparison_operators: { "_eq": { type: "equal" } },
};
Expand Down
2 changes: 1 addition & 1 deletion ndc-lambda-sdk/test/schema/ndc-schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ describe("ndc schema", function() {
}
},
"BigInt": {
representation: { type: "int64" },
representation: { type: "biginteger" },
aggregate_functions: {},
comparison_operators: {
"_eq": { type: "equal" }
Expand Down

0 comments on commit ebad66f

Please sign in to comment.