Module: Rails::GraphQL::Helpers::WithDirectives::DirectiveLocation
- Defined in:
- lib/rails/graphql/helpers/with_directives.rb
Instance Method Summary collapse
-
#directive_location ⇒ Object
Return the symbol that represents the location that the directives must have in order to be added to the list.
-
#directive_location=(value) ⇒ Object
Use this once to define the directive location.
Instance Method Details
#directive_location ⇒ Object
Return the symbol that represents the location that the directives must have in order to be added to the list
32 33 34 35 36 |
# File 'lib/rails/graphql/helpers/with_directives.rb', line 32 def directive_location defined?(@directive_location) \ ? @directive_location \ : superclass.try(:directive_location) end |
#directive_location=(value) ⇒ Object
Use this once to define the directive location
39 40 41 42 43 44 |
# File 'lib/rails/graphql/helpers/with_directives.rb', line 39 def directive_location=(value) raise ArgumentError, +'Directive location is already defined' \ unless directive_location.nil? @directive_location = value end |