Skip to content

Update NDC TypeScript SDK to v8.2.0 and prepare v1.16.0 release #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 18, 2025

Conversation

daniel-chambers
Copy link
Collaborator

@daniel-chambers daniel-chambers commented Jul 18, 2025

Updates the NDC TypeScript SDK to v8.2.0, which means this connector starts talking NDC Spec 0.2.0. Some minor changes were made to support this.

Tracing now also includes the connector name and version in the span attributes.

Completes ENG-1833

@daniel-chambers daniel-chambers self-assigned this Jul 18, 2025
@daniel-chambers daniel-chambers changed the title Update NDC TypeScript SDK to v8.2.0 Update NDC TypeScript SDK to v8.2.0 and prepare v1.16.0 release Jul 18, 2025
Copy link

@paritosh-08 paritosh-08 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 💯

@@ -1,6 +1,7 @@
// We must initialize OpenTelemetry instrumentation before importing any other module
import * as sdkInstrumentation from "@hasura/ndc-sdk-typescript/instrumentation";
sdkInstrumentation.initTelemetry("ndc-lambda-sdk");
import { version as packageVersion } from "../package.json";
sdkInstrumentation.initTelemetry("ndc-lambda-sdk", undefined, undefined, "ndc-nodejs-lambda", packageVersion);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

- Updated to support v0.2.0 of the NDC Spec. This is a very large update which adds new features and some breaking changes to the spec.
- If the `X-Hasura-NDC-Version` header is sent, the SDK will validate that the connector supports the incoming request's version and reject it if it does not. If no header is sent, no action is taken
- Added support for automatically returning compressed responses using gzip or deflate
- All OpenTelemetry trace spans are now annotated with the TypeScript SDK version (`resource.service.version: "8.2.0"`) and the connector name (`resource.service.connector.name: "ndc-nodejs-lambda"`) and version (`resource.service.connector.version: "1.16.0"`). The connector name and version can be overriden using `HASURA_CONNECTOR_NAME` and `HASURA_CONNECTOR_VERSION` environment variables.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@daniel-chambers daniel-chambers merged commit a1c81fd into main Jul 18, 2025
4 checks passed
@daniel-chambers daniel-chambers deleted the daniel/update-ndc-sdk branch July 18, 2025 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants