schema: make user fields non-nullable
They can always be empty. This simplifies mutation, since graphql_client doesn't have an easy way to conditionally leave out fields (we could do that with `@include`, but that's one bool per field in addition to the field, a bit ugly).
This commit is contained in:
committed by
nitnelave
parent
564c09d6ab
commit
0ac9e134de
@@ -141,16 +141,16 @@ impl<Handler: BackendHandler + Sync> User<Handler> {
|
||||
&self.user.email
|
||||
}
|
||||
|
||||
fn display_name(&self) -> Option<&String> {
|
||||
self.user.display_name.as_ref()
|
||||
fn display_name(&self) -> &str {
|
||||
&self.user.display_name
|
||||
}
|
||||
|
||||
fn first_name(&self) -> Option<&String> {
|
||||
self.user.first_name.as_ref()
|
||||
fn first_name(&self) -> &str {
|
||||
&self.user.first_name
|
||||
}
|
||||
|
||||
fn last_name(&self) -> Option<&String> {
|
||||
self.user.last_name.as_ref()
|
||||
fn last_name(&self) -> &str {
|
||||
&self.user.last_name
|
||||
}
|
||||
|
||||
fn creation_date(&self) -> chrono::DateTime<chrono::Utc> {
|
||||
|
||||
Reference in New Issue
Block a user