You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the private schema as a test, how should we separate authorization and resolution?
By breaking them apart, we have a clear separation of concerns, which is good for scalability.
It also means we should be able to identify glaring holes in our permissions.
Some mutations may change the underlying authorization. If authorization is checked using a dataloader, then that dataloader would have to be cleared before returning the mutation resolution, otherwise it'll result in stale authorization.
For example, let's say I call the mutation removeFromTeam which requires the viewer to be on TeamX. The authorizer uses a dataloader to see if an active TeamMember exists. Then, the resolver inactivates that team member & returns the team member. if that team member gets resolved using the dataloader, it'll still show up as active.
Predecessor: #6228
Using the private schema as a test, how should we separate authorization and resolution?
By breaking them apart, we have a clear separation of concerns, which is good for scalability.
It also means we should be able to identify glaring holes in our permissions.
Suggested Options
Considerations
Some mutations may change the underlying authorization. If authorization is checked using a dataloader, then that dataloader would have to be cleared before returning the mutation resolution, otherwise it'll result in stale authorization.
For example, let's say I call the mutation
removeFromTeam
which requires the viewer to be on TeamX. The authorizer uses a dataloader to see if an active TeamMember exists. Then, the resolver inactivates that team member & returns the team member. if that team member gets resolved using the dataloader, it'll still show up as active.Background
This was the challenge problem for backend devs: https://www.notion.so/parabol/Back-end-Technical-Problem-a9d281e0396b41be85865e2b3a8461b4
We also talk about it here: #4540 (comment)
AC
Estimate: 8 hours
The text was updated successfully, but these errors were encountered: