I've got the problem, that I have a graphQL query, with a DateTime and cannot use it with juniper.
At the documentation they write that they have the scalar type feature chrono::DateTime build in by default. So I pub imported the DateTime from chrono. Now I have the Error:
wrong number of type arguments: expected 1, found 0 expected 1 type argument
The code:
use chrono::DateTime;
pub struct ProjectDate;
pub mod project_date {
use serde::{Deserialize, Serialize};
#[doc = "An ISO-8601 encoded UTC date string."]
type DateTime = super::DateTime;
I use juniper = "^0.14.2"
and chrono = "0.4.0"
Any idea, what I am doing wrong?
The solution was the
serde
feature at chrono and theDateTime<Utc>
from @Netwave.and