FaunaDB Custom Resolvers

I have GraphQL setup with FaunaDB and I can pull down data from the GQL schemas. I want to be able to only allow access to collection items that are created by the current logged in user. I’m assuming the best approach is by creating custom resolvers?

Do we have repos or tutorials on how to use resolvers for the current logged in user? I would want the resolver source to remain within my repo and not just on FaunaDB if at all possible.


You can use FaunaDB’s ABAC system to control visibility. This is an FQL-based tutorial, but the roles you configure apply to both the GraphQL and FQL interfaces: https://docs.fauna.com/fauna/current/tutorials/authentication/abac.html

1 Like