Sha256: 0d7cb6ff33c5bc15a6b441ae60ba913b3ffe6400e0dea6a909a9646b9228717a

Contents?: true

Size: 430 Bytes

Versions: 2

Compression:

Stored size: 430 Bytes

Contents

# frozen_string_literal: true

require 'graphql'
require 'graphql-pundit/authorization'
require 'graphql-pundit/scope'

module GraphQL
  # Our custom pundit module
  module Pundit
    # Field class that contains authorization and scope behavior
    # This only works with graphql >= 1.8.0
    class Field < GraphQL::Schema::Field
      prepend GraphQL::Pundit::Scope
      prepend GraphQL::Pundit::Authorization
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
graphql-pundit2-1 lib/graphql-pundit/field.rb
graphql-pundit2-0.9.1 lib/graphql-pundit/field.rb