Sha256: 9a89c57c468007d4e78ea7a45b61c08f69da47e39dbd0f5f66bfdbbb0e9b2257
Contents?: true
Size: 661 Bytes
Versions: 30
Compression:
Stored size: 661 Bytes
Contents
# frozen_string_literal: true module GraphQL class Schema class Directive < GraphQL::Schema::Member class Skip < Schema::Directive description "Directs the executor to skip this field or fragment when the `if` argument is true." locations( GraphQL::Schema::Directive::FIELD, GraphQL::Schema::Directive::FRAGMENT_SPREAD, GraphQL::Schema::Directive::INLINE_FRAGMENT ) argument :if, Boolean, required: true, description: "Skipped when true." default_directive true def self.include?(obj, args, ctx) !args[:if] end end end end end
Version data entries
30 entries across 30 versions & 1 rubygems