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

TypeScript support #11

Open
sobolevn opened this issue May 12, 2019 · 1 comment
Open

TypeScript support #11

sobolevn opened this issue May 12, 2019 · 1 comment
Labels

Comments

@sobolevn
Copy link

sobolevn commented May 12, 2019

Hi, this project looks awesome!

I would really love to use this project with TypeScript. I see two main features:

  1. Typing existing functions (easy part)
  2. Make queries type sensetive
data: {
   users: {
      name: string
   }
}

const users = dinoql(data)`
    users {
      name
    }
`

And then we have users typed as { name: string }[]

@BrunoScheufler
Copy link

This would be really great to see 👍 For the beginning, we could handle response data using generics and shape it as we expect until there's a way to really get typed responses out of it dynamically (which I doubt will be easy). As for typing the existing functionality, that part should actually be pretty straightforward 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants