Class: PlatformosCheck::InvalidArgs::ParsedGraphQL
- Inherits:
-
Object
- Object
- PlatformosCheck::InvalidArgs::ParsedGraphQL
- Defined in:
- lib/platformos_check/checks/invalid_args.rb
Instance Method Summary collapse
- #defined_arguments ⇒ Object
-
#initialize(ast) ⇒ ParsedGraphQL
constructor
A new instance of ParsedGraphQL.
- #required_arguments ⇒ Object
Constructor Details
#initialize(ast) ⇒ ParsedGraphQL
Returns a new instance of ParsedGraphQL.
6 7 8 |
# File 'lib/platformos_check/checks/invalid_args.rb', line 6 def initialize(ast) @ast = ast end |
Instance Method Details
#defined_arguments ⇒ Object
16 17 18 |
# File 'lib/platformos_check/checks/invalid_args.rb', line 16 def defined_arguments variables.map(&:name) end |
#required_arguments ⇒ Object
10 11 12 13 14 |
# File 'lib/platformos_check/checks/invalid_args.rb', line 10 def required_arguments variables.each_with_object([]) do |v, vars| vars << v.name if v.type.is_a?(GraphQL::Language::Nodes::NonNullType) end end |