How to modularize app? #1141
-
Hi What is the best way to modularize an API? I tried the following: ├── main.rs In root query.rs I have:
and then, in each query of each modules I wanted to do this: Example: [users/query.rs]
I get this error:
If I do not use #[graphql_object(context = Context)] in users/query.rs the functions are not available I also tried to use the functions of users/query.rs a root query.rs and use them in the impl of QueryRoot
The above works fine, but I don't like to have to redefine each of the functions |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This #646 (comment) works for me |
Beta Was this translation helpful? Give feedback.
This #646 (comment) works for me