graphql-guard v1.0.0 Release Notes

Release Date: 2017-07-31 // about 5 years ago
    • 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)