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
: (GraphQL::Schema::Field object, GraphQL::Query::Context context, include_deprecated: bool) -> Array.
-
.resolve_is_deprecated(object, _context) ⇒ Object
: (GraphQL::Schema::Field object, GraphQL::Query::Context _context) -> bool.
Instance Method Summary collapse
-
#args(include_deprecated:) ⇒ Object
: (include_deprecated: bool) -> Array.
-
#is_deprecated ⇒ Object
: -> bool.
Class Method Details
.resolve_args(object, context, include_deprecated:) ⇒ Object
: (GraphQL::Schema::Field object, GraphQL::Query::Context context, include_deprecated: bool) -> Array
30 31 32 33 34 |
# File 'lib/graphql/introspection/field_type.rb', line 30 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
: (GraphQL::Schema::Field object, GraphQL::Query::Context _context) -> bool
20 21 22 |
# File 'lib/graphql/introspection/field_type.rb', line 20 def self.resolve_is_deprecated(object, _context) !!object.deprecation_reason end |
Instance Method Details
#args(include_deprecated:) ⇒ Object
: (include_deprecated: bool) -> Array
37 38 39 |
# File 'lib/graphql/introspection/field_type.rb', line 37 def args(include_deprecated:) self.class.resolve_args(object, context, include_deprecated: include_deprecated) end |
#is_deprecated ⇒ Object
: -> bool
25 26 27 |
# File 'lib/graphql/introspection/field_type.rb', line 25 def is_deprecated self.class.resolve_is_deprecated(object, context) end |