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

Need support for @pothos/plugin-prisma: v4, for Edge environments #72

Open
sarablanchardllc opened this issue Aug 10, 2024 · 3 comments

Comments

@sarablanchardllc
Copy link

Access to Prisma.dmmf was removed in edge environments: prisma/prisma#22962

This caused issues with @pothos/plugin-prisma which was then fixed in v4: hayes/pothos#1190

Dep requirements for Edge:

  • For the dmmf fix need: @pothos/plugin-prima v4.0.0
  • @pothos/plugin-prisma requires: @pothos/core v4.0.0

Relevant package.json info:
Screenshot 2024-08-10 at 2 51 40 AM

schema.prisma:
Screenshot 2024-08-10 at 3 09 58 AM

Error in graphql/builder.ts
Screenshot 2024-08-10 at 2 51 00 AM

Please let me know if I need to provide more information.

@ad6025b
Copy link

ad6025b commented Aug 10, 2024

@sarablanchardllc you need to change the from to reference the generated type
image

@sarablanchardllc
Copy link
Author

@sarablanchardllc you need to change the from to reference the generated type

The file I was targeting is the generated pothos-type.ts, it just lives in the same folder as the schema.prisma file (root/prisma).

"getDataModel" is found properly when running "@pothos/plugin-prisma" is at version 4.0.0.
The prisma plugin for prismos doesn't generate "getDataModel" within the "generated pothos-types.ts" file when using an earlier version.

@Cauen
Copy link
Owner

Cauen commented Oct 8, 2024

Hi @sarablanchardllc
We updated the peerDeps to pothos versions 4+, this solves you problema?

Sorry for the delay :X

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

3 participants