Hi, everyone :wave: Do you guys have any examples...
# orm-help
a
Hi, everyone 👋 Do you guys have any examples of a setup using Prisma Client from Cypress tests? I am currently using cy.task to execute a node process but this is forcing me to create a task for every query I need to perform, which is cumbersome
🤔 1
a
You could use module augmentation to bring Prisma into cypress or vice versa. Or, instantiate a Prisma client handler that's bound to the Global object typeof globalThis Something like this for the global handler
Else, augmentation should do the trick. I augment Nextjs and other libraries on most projects to inject the root with global context types of utility (the normalized cache object of Apollo client or the users session, for example, anchored to pageProps with strongly typed definitions)
The file that the next/app module is declared in is in my project types directory, titled next.d.ts