You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m currently using Juniper 0.16.1 and want to split my root queries across multiple files (to keep each domain’s logic separate). My goal is for all fields to appear at the top-level QueryRoot, but I want each file to provide its own set of fields.
Right now, if I annotate each file’s impl QueryRoot { ... } with #[graphql_object], I get a "conflicting implementations" error for GraphQLType. I used to solve this with juniper_compose but that crate no longer supports 0.16.
Is there an official or recommended way to have multiple partial #[graphql_object] impl blocks for the same QueryRoot in Juniper 0.16? Or is there a plan to provide a plugin or crate (similar to juniper_compose) to unify separate query definitions into one root object without conflicting trait implementations?
I’m aware I can create a single impl QueryRoot with #[graphql_object] and delegate the actual logic to separate functions in each file, but that requires aggregating all fields in one place. For maintainability, I’d like to keep each domain fully self-contained—including its own #[graphql_object] block—and still have them end up on the same GraphQL root.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi,
I’m currently using Juniper 0.16.1 and want to split my root queries across multiple files (to keep each domain’s logic separate). My goal is for all fields to appear at the top-level QueryRoot, but I want each file to provide its own set of fields.
Right now, if I annotate each file’s impl QueryRoot { ... } with #[graphql_object], I get a "conflicting implementations" error for GraphQLType. I used to solve this with juniper_compose but that crate no longer supports 0.16.
Is there an official or recommended way to have multiple partial #[graphql_object] impl blocks for the same QueryRoot in Juniper 0.16? Or is there a plan to provide a plugin or crate (similar to juniper_compose) to unify separate query definitions into one root object without conflicting trait implementations?
I’m aware I can create a single impl QueryRoot with #[graphql_object] and delegate the actual logic to separate functions in each file, but that requires aggregating all fields in one place. For maintainability, I’d like to keep each domain fully self-contained—including its own #[graphql_object] block—and still have them end up on the same GraphQL root.
Thanks!
The text was updated successfully, but these errors were encountered: