Blair
05/24/2022, 4:02 AMusers: N patients: N referrals: N referral_notes
• User has many patient records
• Patient records have many referrals
• Referrals have many referral_notes
I need to enforce rules similar to these:
• A user
may be granted access to a referral
through their patient
record.
• A user
may be granted access to a referral
explicitly via a record in another table (permissions
table)
• Whenever a user has access to a referral
, they automatically have access to view referral_notes
I have tried to use graphql-guard
with prisma as a POC, but not sure if this is the correct combination of tools for this use case.
Any help would be hugely appreciated. 🙏Nurul
05/24/2022, 7:07 AMBlair
05/24/2022, 7:11 AMNurul
05/24/2022, 7:21 AMNurul
05/24/2022, 7:22 AMAdrian
05/24/2022, 3:54 PM