Sha256: e8d80be367463b9e2266107e2a79f8cda191ef828ebce8e4e391f31246fbde4d
Contents?: true
Size: 683 Bytes
Versions: 30
Compression:
Stored size: 683 Bytes
Contents
# frozen_string_literal: true module GraphQL class Schema class Directive < GraphQL::Schema::Member class Include < GraphQL::Schema::Directive description "Directs the executor to include this field or fragment only 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: "Included 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