I’m running into an issue where optional parameters are throwing an error with dgraph:
"message": "couldn't rewrite query getUser because Argument (username) of getUser was not able to be parsed as a string",
On query:
query getUser($email: String $username: String) {
getUser(email: $email, username: $username) {
id
email
}
}
Variables: { "email": "dfaadfs@dfssdfjk.com" }
The problem goes away when I include a "username": "..."
in the variables. These are optional fields, and shouldn’t require the presence of ALL fields for the query to work.
Does this make sense?