Class: GraphQLSchema::Directive
- Inherits:
-
Object
- Object
- GraphQLSchema::Directive
- Defined in:
- lib/graphql_schema.rb
Constant Summary collapse
- BUILTIN =
%w(skip include deprecated).to_set
Instance Method Summary collapse
- #builtin? ⇒ Boolean
-
#initialize(directive) ⇒ Directive
constructor
A new instance of Directive.
- #locations ⇒ Object
Methods included from WithArgs
#args, #optional_args, #required_args
Methods included from NamedHash
#camelize_name, #classify_name, #description, #name, #to_h, #upcase_name
Constructor Details
#initialize(directive) ⇒ Directive
Returns a new instance of Directive.
232 233 234 |
# File 'lib/graphql_schema.rb', line 232 def initialize(directive) @hash = directive end |
Instance Method Details
#builtin? ⇒ Boolean
240 241 242 |
# File 'lib/graphql_schema.rb', line 240 def builtin? BUILTIN.include?(name) end |
#locations ⇒ Object
236 237 238 |
# File 'lib/graphql_schema.rb', line 236 def locations @hash.fetch('locations') end |