fun getParentType()

in src/main/kotlin/com/netflix/dgs/plugin/DgsDataFetcher.kt [51:60]


        fun getParentType(annotation: PsiAnnotation): String? {
            return when (annotation.qualifiedName) {
                "com.netflix.graphql.dgs.DgsQuery" -> "Query"
                "com.netflix.graphql.dgs.DgsMutation" -> "Mutation"
                "com.netflix.graphql.dgs.DgsSubscription" -> "Subscription"
                "com.netflix.graphql.dgs.DgsData" -> (annotation.toUElement() as UAnnotation).findAttributeValue("parentType")
                    ?.evaluateString()
                else -> throw IllegalArgumentException("Annotation ${annotation.qualifiedName} is not a data fetcher annotation")
            }
        }