-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
I've got userType
that represents the viewer. I'm also using this type when getting viewer's friends.
But some fields are only related to viewer. For example, chatMessageSound: bool, notificationsEmail: bool
. So it doesn't make sense to return those fields if it has been queried from friends
field.
How to deal with this?
I can check it and return null for all those fields but it isn't best way to do that, so I should convert all non-nullable fields to back.
I also don't want to create seperate 2 types because they have many common fields.
Is there a way to implement it with inheritence?
Metadata
Metadata
Assignees
Labels
No labels