zenstackhq / zenstack

Fullstack TypeScript toolkit that enhances Prisma ORM with flexible Authorization layer for RBAC/ABAC/PBAC/ReBAC, offering auto-generated type-safe APIs and frontend hooks.
https://zenstack.dev
MIT License
2.07k stars 88 forks source link

[@tanstack/vue-query] Generated hooks have wrong typings #1056

Closed juni0r closed 7 months ago

juni0r commented 7 months ago

The generated hooks for @tanstack/vue-query@5.24.1 have some wrong typings.

This is probably related to #945?

Environment:

schema.zmodel

datasource db {
  provider = "postgresql"
  url = env("DATABASE_URL")
}

plugin prisma {
  provider = '@core/prisma'
  format = true
}

plugin hooks {
  provider = '@zenstackhq/tanstack-query'
  target = 'vue'
  version = 'v5'
  output = 'hooks'
}

generator client {
  provider = "prisma-client-js"
}

Screenshots

Screenshot 2024-02-25 at 21 56 23 Screenshot 2024-02-25 at 21 53 19 Screenshot 2024-02-25 at 21 49 00
ymc9 commented 7 months ago

Hi @juni0r , it's already fixed with #1009 and will be included in the upcoming 1.10.0 release.

ymc9 commented 7 months ago

Fixed in 1.10.0