Class: GraphQL::ObjectType::Printer
- Inherits:
-
Object
- Object
- GraphQL::ObjectType::Printer
- Includes:
- Singleton
- Defined in:
- lib/graphql/object_type.rb
Overview
Print a type, using the query-style naming pattern
Instance Method Summary collapse
Instance Method Details
#print(type) ⇒ Object
67 68 69 70 71 72 73 74 75 |
# File 'lib/graphql/object_type.rb', line 67 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 |