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

Drizzle add relational objects during insert/update? #3

Open
anthonyhoegberg opened this issue Apr 22, 2024 · 2 comments
Open

Drizzle add relational objects during insert/update? #3

anthonyhoegberg opened this issue Apr 22, 2024 · 2 comments
Assignees

Comments

@anthonyhoegberg
Copy link

Is it possible to get relations in the mutations (insert/update) as well, like lets say we have a user and a post table currently when i do a query i can request the posts as well however i would also like to be able to add posts during the creation of the user object.

when i create a user, i would like to also add posts as a subfield in the generated UserInsertInput type so when i create the user object, i can attach posts to it instead of doing 2 different inserts.

This might not be a good example with user and post, but i have other data where this would be the easiest way to insert a lot of data at once, and i have many different relations aswell

@Sukairo-02
Copy link
Collaborator

I'll check if and how that's possible to implement, would likely need Drizzle RQB to support such actions to begin with.

@Sukairo-02 Sukairo-02 self-assigned this Apr 22, 2024
@anthonyhoegberg
Copy link
Author

Thank you for your quick response

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

2 participants