Hi, if I think of this from a graphql perspective then the entity is always the same (‘user’) but then each resolver that would resolve sensitive fields would check to see if it should attempt to resolve the field based on credentials.
Assuming that the view of users a patient sees is a strict subset of what an admin can see for example, I’d go for the 2nd option with code that would perhaps look like this
get_user(...)
|> add_extras(role) # eg role resolves to :admin
|> put_resp()
essentially ‘decorating’ the base object with extra detail if appropriate. Do note that this may increase sql query count however depending on how the data is fetched, so keep that in mind as well






















