From 0165c1eacbc8d086b391d7e57b16d6e9cd97f39f Mon Sep 17 00:00:00 2001 From: banjjoknim Date: Tue, 2 Aug 2022 16:01:40 +0900 Subject: [PATCH] =?UTF-8?q?refactor=20:=20Query=20=ED=95=A8=EC=88=98?= =?UTF-8?q?=EC=97=90=20GraphQL=20=EC=96=B4=EB=85=B8=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/kotlin/com/banjjoknim/graphqlkotlin/person/PersonQuery.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/놀이터(예제 코드 작성)/graphql-kotlin/src/main/kotlin/com/banjjoknim/graphqlkotlin/person/PersonQuery.kt b/놀이터(예제 코드 작성)/graphql-kotlin/src/main/kotlin/com/banjjoknim/graphqlkotlin/person/PersonQuery.kt index ef6cfa0..ced0689 100644 --- a/놀이터(예제 코드 작성)/graphql-kotlin/src/main/kotlin/com/banjjoknim/graphqlkotlin/person/PersonQuery.kt +++ b/놀이터(예제 코드 작성)/graphql-kotlin/src/main/kotlin/com/banjjoknim/graphqlkotlin/person/PersonQuery.kt @@ -1,5 +1,6 @@ package com.banjjoknim.graphqlkotlin.person +import com.expediagroup.graphql.generator.annotations.GraphQLDescription import com.expediagroup.graphql.generator.annotations.GraphQLIgnore import com.expediagroup.graphql.server.operations.Query import org.springframework.beans.factory.annotation.Autowired @@ -17,6 +18,7 @@ class PersonQuery( private val personRepository: PersonRepository ) : Query { + @GraphQLDescription("get Person Instance") fun getPerson(name: String): Person = Person(name) /** @@ -31,6 +33,7 @@ class PersonQuery( * If you are using custom data fetcher make sure that you extend SpringDataFetcher instead of the base FunctionDataFetcher to keep this functionallity. * ``` */ + @GraphQLDescription("find Person Instance") fun findPerson(@GraphQLIgnore @Autowired personRepository: PersonRepository, name: String): Person? { return personRepository.findPerson(name) }