error[E0107]: type alias takes 1 generic argument but 2 generic arguments were supplied
--> models/src/user.rs:29:51
|
29 | #[derive(Serialize, Deserialize, Debug, Validate, juniper::GraphQLInputObject)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| expected 1 generic argument
| help: remove this generic argument
|
note: type alias defined here, with 1 generic parameter: `T`
--> models/src/lib.rs:52:6
|
52 | type Result<T> = std::result::Result<T, diesel::result::Error>;
| ^^^^^^ -
= note: this error originates in the derive macro `juniper::GraphQLInputObject` (in Nightly builds, run with -Z macro-backtrace for more info)
Expected behavior
Successful compilation, as happens when the type alias is renamed to anything else, for example, there are no issues with the following:
type DatabaseResult<T> = std::result::Result<T, diesel::result::Error>;
Describe the bug In a crate with this type alias:
Deriving
GraphQLInputObject
for structs that include optional values will fail.To Reproduce
Given the above type alias, and the following struct
The following error is returned:
Expected behavior
Successful compilation, as happens when the type alias is renamed to anything else, for example, there are no issues with the following:
Additional context