Class: GraphQL::ObjectType::Printer
- Inherits:
-
Object
- Object
- GraphQL::ObjectType::Printer
- Includes:
- Singleton
- Defined in:
- lib/graph_ql/object_type.rb
Overview
Print a type, using the query-style naming pattern
Instance Method Summary collapse
Instance Method Details
#print(type) ⇒ Object
82 83 84 85 86 87 88 89 90 |
# File 'lib/graph_ql/object_type.rb', line 82 def print(type) if type.kind.non_null? "#{print(type.of_type)}!" elsif type.kind.list? "[#{print(type.of_type)}]" else type.name end end |