We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20c8d20 commit c60101bCopy full SHA for c60101b
src/main/kotlin/com/expedia/graphql/extensions/deepName.kt
@@ -1,8 +1,7 @@
1
package com.expedia.graphql.extensions
2
3
-import graphql.schema.GraphQLList
4
-import graphql.schema.GraphQLNonNull
5
import graphql.schema.GraphQLType
+import graphql.schema.GraphQLTypeUtil
6
7
/**
8
* Useful public extension that renders a readable string from the given
@@ -12,8 +11,4 @@ import graphql.schema.GraphQLType
12
11
* @return a string representation of the type taking list and non-null into account
13
*/
14
val GraphQLType.deepName: String
15
- get() = when {
16
- this is GraphQLNonNull -> "${wrappedType.deepName}!"
17
- this is GraphQLList -> "[${wrappedType.deepName}]"
18
- else -> name
19
- }
+ get() = GraphQLTypeUtil.simplePrint(this)
0 commit comments