hasura / ndc-typescript-deno

Instant Hasura Native Data Connector by writing Typescript Functions
https://hasura.io
Apache License 2.0
21 stars 3 forks source link

Input type objects should be supported [engine] #56

Open 111mihir opened 1 year ago

111mihir commented 1 year ago

I cannot currently declare a function with input type set to an object. It should be possible to do that easily.

Eg:

export async function InsertUser({
  first_name,
  last_name
}: {
  first_name: string,
  last_name: string
}): Promise<{ status: string, message: string }> {}

Adding this as a procedure in a connector to hasura results in the build(created using the cli) failing with this error:

[Error { message: "building metadata failed: invalid metadata: error building schema: unable to build schema: internal error: no support for: object types as input", locations: None, path: None, extensions: Some({"code": String("legacyError"), "id": String("aac85ca2-d551-4a81-bc6e-d47ec3abcede")}) }]