Skip to content

Commit c5df3d3

Browse files
robinjoonclaude
andauthored
chore: 루트 GraphQL 스키마 파일 추가 (#9)
* chore: 루트 GraphQL 스키마 파일 추가 learning.graphqls가 최상위 Query/Mutation을 직접 정의하여 다른 BC 스키마와 충돌하는 문제를 해결한다. schema.graphqls에 빈 루트 타입을 정의하고, learning.graphqls를 extend type으로 변경한다. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: 루트 Query에 placeholder 필드 추가 빈 Query 타입은 유효하지 않은 GraphQL 스키마이므로 SpectaQL 문서 생성이 실패한다. _health placeholder 필드를 추가하여 해결한다. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5001f0e commit c5df3d3

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

spectaql/config.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
spectaql:
2-
targetDir: build/spectaql
2+
targetDir: build/spectaql
33

44
introspection:
5-
schemaFile:
6-
- src/main/resources/schema/auth.graphqls
5+
schemaFile:
6+
- src/main/resources/schema/schema.graphqls
7+
- src/main/resources/schema/auth.graphqls
78
# - src/main/resources/schema/task.graphqls
89

910
info:
10-
title: Loop GraphQL API
11-
description: Loop 프로젝트 GraphQL API 레퍼런스
12-
x-url: https://api.loop.example.com/graphql
11+
title: Loop GraphQL API
12+
description: Loop 프로젝트 GraphQL API 레퍼런스
13+
x-url: https://api.loop.example.com/graphql

src/main/resources/schema/learning.graphqls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# =============================================================
1616

1717
# ----- Query (조회) -----
18-
type Query {
18+
extend type Query {
1919
# 단순 조회: ID로 단건 조회
2020
show(id: ID!): Show
2121

@@ -30,7 +30,7 @@ type Query {
3030
}
3131

3232
# ----- Mutation (변경) -----
33-
type Mutation {
33+
extend type Mutation {
3434
# 단순 생성
3535
addShow(input: AddShowInput!): Show!
3636

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
"루트 Query 타입"
2+
type Query {
3+
"서버 상태 확인"
4+
_health: Boolean
5+
}
6+
7+
"루트 Mutation 타입"
8+
type Mutation

0 commit comments

Comments
 (0)