error[E0107]: missing generics for struct `chrono::DateTime`
bbigras opened this issue · 2 comments
bbigras commented
query
mutation Publish($id: ID!, $input: [PublicationInput!]!) {
publishablePublish(id: $id, input: $input) {
userErrors {
field
message
}
}
}4 | #[derive(GraphQLQuery)]
| ^^^^^^^^^^^^ expected 1 generic argument
|
note: struct defined here, with 1 generic parameter: `Tz`
--> /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/chrono-0.4.23/src/datetime/mod.rs:89:12
|
89 | pub struct DateTime<Tz: TimeZone> {
| ^^^^^^^^ --
= note: this error originates in the derive macro `GraphQLQuery` (in Nightly builds, run with -Z macro-backtrace for more info)
help: add missing generic argument
|
4 | #[derive(GraphQLQuery<Tz>)]
I tried using #[derive(GraphQLQuery<Utc>)] but I get:
4 | #[derive(GraphQLQuery<Utc>)]
| ^ expected one of `(`, `,`, `::`, or `=`
tomhoule commented
Have you tried defining type DateTime = chrono::DateTime<Utc> in the parent scope?
bbigras commented
It works. Thank you very much!