Class: GraphQL::Introspection::FieldType
- Inherits:
-
Introspection::BaseObject
- Object
- Introspection::BaseObject
- GraphQL::Introspection::FieldType
- Defined in:
- lib/graphql/introspection/field_type.rb
Class Method Summary collapse
- .resolve_args(object, context, include_deprecated:) ⇒ Object
- .resolve_is_deprecated(object, _context) ⇒ Object
Instance Method Summary collapse
Class Method Details
.resolve_args(object, context, include_deprecated:) ⇒ Object
25 26 27 28 29 |
# File 'lib/graphql/introspection/field_type.rb', line 25 def self.resolve_args(object, context, include_deprecated:) args = context.types.arguments(object) args = args.reject(&:deprecation_reason) unless include_deprecated args end |
.resolve_is_deprecated(object, _context) ⇒ Object
17 18 19 |
# File 'lib/graphql/introspection/field_type.rb', line 17 def self.resolve_is_deprecated(object, _context) !!object.deprecation_reason end |
Instance Method Details
#args(include_deprecated:) ⇒ Object
31 32 33 |
# File 'lib/graphql/introspection/field_type.rb', line 31 def args(include_deprecated:) self.class.resolve_args(object, context, include_deprecated: include_deprecated) end |
#is_deprecated ⇒ Object
21 22 23 |
# File 'lib/graphql/introspection/field_type.rb', line 21 def is_deprecated self.class.resolve_is_deprecated(object, context) end |