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

No typescript types and different response shapes between packages #10

Open
sebastianwessel opened this issue Sep 19, 2023 · 0 comments

Comments

@sebastianwessel
Copy link

First: 👏 great job - cool product and lib's!

The surrealdb.js package already provides typings for results like this:

query: <T extends RawQueryResult[]>(
		query: string,
		vars?: Record<string, unknown>,
	) => Promise<MapQueryResult<T>>;

Would be awesome if this would also become available in surrealdb.node.

Also, there is a difference in the response shapes of surrealdb.node, surrealdb.wasm and surrealdb.js

The surrealdb.js package provides a result like this:

[
  {
    status: string
    result?: <result type>
  } 
]

while surrealdb.node and surrealdb.wasm is returning a less deep, structured response like this:

[
   <result type>
]

It would be great if this becomes aligned across all the different cool packages.

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

No branches or pull requests

1 participant