Class: GraphQL::BaseType::Printer
- Inherits:
-
Object
- Object
- GraphQL::BaseType::Printer
- Includes:
- Singleton
- Defined in:
- lib/graphql/base_type.rb
Overview
Print a type, using the query-style naming pattern
Instance Method Summary collapse
Instance Method Details
#print(type) ⇒ Object
72 73 74 75 76 77 78 79 80 |
# File 'lib/graphql/base_type.rb', line 72 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 |