juniper/tests/codegen/pass/local_send.rs
Peter Holloway 801820a3b6
Use fully qualified paths in generated code (#1195)
If user code has a type alias (or custom type) called `Result` or
`Option` etc, this would be used instead of the intended standard
library types causing surprising compile errors from generated code.

Using the fully qualified path allows the generated code to be isolated
from user types.

Includes two basic regression tests covering `Result` and `Send`.

Fixes #1194
2023-10-06 11:59:00 -07:00

12 lines
272 B
Rust

// Local types overriding the stdlib Send should not affect generated code
trait Send {}
#[derive(juniper::GraphQLInputObject)]
#[graphql(name = "UserInformation")]
pub struct Update {
pub email: Option<String>,
pub username: Option<String>,
}
pub fn main() {}