All Versions
12
Latest Version
Avg Release Cycle
91 days
Latest Release
549 days ago

Changelog History
Page 1

  • v2.0.0 Changes

    April 20, 2020
    • ๐Ÿ‘ Added: support for graphql gem version >= 1.10 with Interpreter. #39
    • ๐Ÿšš Removed: support for previous graphql gem versions. #39

    ๐Ÿ’ฅ Breaking changes:

    • ๐Ÿ’Ž Requires using graphql gem version >= 1.10.0 with Interpreter.

    Before:

    class Schema < GraphQL::Schema
      query QueryType
      mutation MutationType
    
      use GraphQL::Guard.new
    end
    

    After:

    class Schema < GraphQL::Schema
      use GraphQL::Execution::Interpreter
      use GraphQL::Analysis::AST
    
      query QueryType
      mutation MutationType
    
      use GraphQL::Guard.new
    end
    
    • ๐Ÿ“‡ Use the actual type in the Policy object without type.metadata[:type_class].

    Before (with graphql gem version >= 1.8 and class-based type definitions):

    class GraphqlPolicy
      def self.guard(type, field)
        RULES.dig(type.metadata[:type_class], field)
      end
    end
    

    After:

    class GraphqlPolicy
      def self.guard(type, field)
        RULES.dig(type, field)
      end
    end
    
  • v1.3.1 Changes

    January 22, 2020
    • ๐Ÿ›  Fixed: compatibility with graphql gem version 1.10. #36
  • v1.3.0 Changes

    October 24, 2019
    • 0๏ธโƒฃ Added: More descriptive default error message for NotAuthorizedError. #32
  • v1.2.2 Changes

    March 04, 2019
    • ๐Ÿ’Ž Fixed: compatibility with Ruby 2.6 and graphql gem version 1.7. #26
  • v1.2.1 Changes

    October 18, 2018
    • ๐Ÿ’Ž Fixed: compatibility with Ruby 2.5 and graphql gem version 1.7. #21
  • v1.2.0 Changes

    June 29, 2018
    • ๐Ÿ‘ Added: support for graphql gem version 1.8. #17
  • v1.1.0 Changes

    May 09, 2018
    • ๐Ÿ‘ Added: support to mask fields depending on the context.
  • v1.0.0 Changes

    July 31, 2017
    • Changed: guards for every * field also accepts arguments: ->(object, arguments, context) { ... }:

    Before:

    GraphQL::ObjectType.define do name "Post" guard ->(obj, ctx) { ... } ... end

    After:

    GraphQL::ObjectType.define do name "Post" guard ->(obj, args, ctx) { ... } ... end

    • Changed: .field_with_guard from graphql/guard/testing module accepts policy object as a second argument:

    Before:

    guard_object = GraphQL::Guard.new(policy_object: GraphqlPolicy) posts_field = QueryType.field_with_guard('posts', guard_object)

    After:

    posts_field = QueryType.field_with_guard('posts', GraphqlPolicy)

  • v0.4.0 Changes

    July 25, 2017
    • โœ… Added: ability to test guard lambdas via field.
  • v0.3.0 Changes

    July 19, 2017
    • Added: ability to use custom error handlers.