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

Add context.transaction for interactive Prisma transactions when using a Keystone context #9122

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

dcousens
Copy link
Member

@dcousens dcousens commented Apr 30, 2024

This pull request adds context.transaction for running interactive Prisma transactions through a Keystone context.
An example has been added in examples/transactions/schema.ts that shows how you might use this functionality in a custom GraphQL mutation.

This functionality is the bare-minimum approach to adding transactions for now, but future work will focus on how we can integrate transactions into hooks and other Keystone operations more fluently.

@dcousens dcousens changed the title Add context.transaction for interactive transactions when using a context Add context.transaction for interactive transactions when using a Keystone context Apr 30, 2024
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit b276fb4:

Sandbox Source
@keystone-6/sandbox Configuration

@dcousens dcousens changed the title Add context.transaction for interactive transactions when using a Keystone context Add context.transaction for interactive Prisma transactions when using a Keystone context Apr 30, 2024
@dcousens dcousens merged commit e0aecbb into main Apr 30, 2024
43 checks passed
@dcousens dcousens deleted the transactions branch April 30, 2024 03:39
@dcousens dcousens mentioned this pull request Apr 30, 2024
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

Successfully merging this pull request may close these issues.

1 participant