801820a3b6
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
12 lines
305 B
Rust
12 lines
305 B
Rust
// Local types overriding the stdlib Result should not affect generated code
|
|
|
|
type Result<T> = std::result::Result<T, ()>;
|
|
|
|
#[derive(juniper::GraphQLInputObject)]
|
|
#[graphql(name = "UserInformation")]
|
|
pub struct Update {
|
|
pub email: Option<String>,
|
|
pub username: Option<String>,
|
|
}
|
|
|
|
pub fn main() {}
|