Skip to content
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

Lambda connector runs if the functions.ts file is invalid syntactically, but serves empty schema #10590

Open
SandeepSamba opened this issue Oct 30, 2024 · 0 comments

Comments

@SandeepSamba
Copy link
Contributor

With the following functions.ts , the connector starts up, even though it is syntactically invalid (two functions named hello with the same signature)

/**
 * @readonly Exposes the function as an NDC function (the function should only query data without making modifications)
 */
export function hello(name?: string) {
  return `HELLO ${name ?? "world"}`;
}

/**
 * @readonly Exposes the function as an NDC function (the function should only query data without making modifications)
 */
export function hello(name?: string) {
  return {greeting: name};
}

I would expect the connector to crash if it encounters a project where TS encounters errors on compilation. This behavior is misleading as currently with this functions.ts , ddn connector introspect <connector-name> goes through without error but gets empty schema and updates the DataConnectorLink with it (removing my old schema, if any)

@daniel-chambers daniel-chambers transferred this issue from hasura/ndc-nodejs-lambda Nov 7, 2024
@daniel-chambers daniel-chambers self-assigned this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants