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

Nested operations #12

Closed
Brendonovich opened this issue Mar 2, 2022 · 3 comments
Closed

Nested operations #12

Brendonovich opened this issue Mar 2, 2022 · 3 comments
Labels

Comments

@Brendonovich
Copy link
Owner

With, fetch and update are implemented for non-nested actions, but going any deeper than that isn't currently possible.
Supporting this isn't hard, just takes more codegen and some more thought.

This was referenced Mar 2, 2022
@Brendonovich
Copy link
Owner Author

Brendonovich commented Apr 7, 2022

The following should be possible:

client
    .user()
    .create(
        user::name::set("Name".to_string()),
        user::image::create(image::url::set("some url".to_string())),
    )
    .exec()
    .await;

@Brendonovich
Copy link
Owner Author

Nested With/Fetch Example

client
    .user()
    .find_unique(user::id::equals(0))
    .with(user::profile::fetch()
        .with(profile::image::fetch())
    )
    .exec()
    .await;

@Brendonovich
Copy link
Owner Author

Splitting into #45 and #44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant