Join Slack
Powered by
is it possible (recommended) to access prisma inte...
# orm-help
a
Adam Boulila
04/14/2022, 2:30 PM
is it possible (recommended) to access prisma interfaces from frontend to add typing to responses from fetch requests
a
Austin
04/14/2022, 9:37 PM
Hey Adam 👋 , It is definitely possible and pretty common. Prisma generates a type for each model in your schema and they can be imported from the
@prisma/client
package. You can specify them as type imports to be explicit:
Copy code
import type { User, Post } from '@prisma/client'
a
Adam Boulila
04/18/2022, 1:05 PM
Thank you very much
Open in Slack
Previous
Next