Protect your GraphQL data with resource_policy

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • resource_policy

  • In this article, we will discuss how to integrate GraphQL with resource_policy, a Ruby gem for attribute-level authorization, to create fine-grained access control for your API. We will cover the basic concepts of resource_policy, how to use it to protect your resources, and how to expose your policies through GraphQL to provide your API users with visibility into which data they can access.

  • Pundit

    Minimal authorization through OO design and pure Ruby classes

  • Expressing authorization rules can be a bit challenging with the use of other authorization gems, such as pundit or cancancan. The resource_policy gem provides a more concise and expressive policy definition that uses a simple block-based syntax that makes it easy to understand and write authorization rules for each attribute.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • CanCanCan

    The authorization Gem for Ruby on Rails.

  • Expressing authorization rules can be a bit challenging with the use of other authorization gems, such as pundit or cancancan. The resource_policy gem provides a more concise and expressive policy definition that uses a simple block-based syntax that makes it easy to understand and write authorization rules for each attribute.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts