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

Expose Prisma types as Wasp imports #901

Closed
sodic opened this issue Dec 22, 2022 · 1 comment · Fixed by #945 or #962
Closed

Expose Prisma types as Wasp imports #901

sodic opened this issue Dec 22, 2022 · 1 comment · Fixed by #945 or #962
Assignees
Labels
analyzer wasp compiler frontend compiler dx enhancement New feature or request prisma webdev

Comments

@sodic
Copy link
Contributor

sodic commented Dec 22, 2022

Until we implement full-stack type support in Wasp , we should make entity types Prisma generates available to our users on both the server and the client.

NOTE: We need to make sure Prisma types cannot contain anything server-specific in terms of runtime.

This is how the usage might look like:

import { Task } from '@wasp/entities/Task'

// ...

const { data: tasks } = useQuery<Task[]>(...)
@sodic
Copy link
Contributor Author

sodic commented Jan 24, 2023

Not quite closed yet, but close to closing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer wasp compiler frontend compiler dx enhancement New feature or request prisma webdev
Projects
None yet
1 participant