From 5d2216d8ffab946c526db7be3b9bcc012673ecb5 Mon Sep 17 00:00:00 2001 From: SnO2WMaN Date: Wed, 6 Oct 2021 19:42:03 +0900 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20bff=E3=81=AE=E6=9C=80=E7=B5=82?= =?UTF-8?q?=E6=9A=AB=E5=AE=9A=E3=82=AF=E3=82=A8=E3=83=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bff b/bff index 43cced6..be56e40 160000 --- a/bff +++ b/bff @@ -1 +1 @@ -Subproject commit 43cced615175586828e4d5d46bef353277809a4d +Subproject commit be56e40bfca6e8427bf22a8aa87efab847364a09 From b91ad9bef861ebbf0e514341065bffcba16daffb Mon Sep 17 00:00:00 2001 From: SnO2WMaN Date: Wed, 6 Oct 2021 19:48:01 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=E7=8F=BE=E7=8A=B6=E3=81=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extends/answer.graphql | 9 --------- extends/authors.graphql | 30 ------------------------------ extends/book.graphql | 31 ------------------------------- extends/bookseries.graphql | 31 ------------------------------- extends/henken.graphql | 9 --------- extends/user.graphql | 31 ------------------------------- schema.graphql | 31 +++++++++++++++++-------------- 7 files changed, 17 insertions(+), 155 deletions(-) delete mode 100644 extends/answer.graphql delete mode 100644 extends/henken.graphql diff --git a/extends/answer.graphql b/extends/answer.graphql deleted file mode 100644 index 656a8c8..0000000 --- a/extends/answer.graphql +++ /dev/null @@ -1,9 +0,0 @@ -extend type Query { - manyAnswers( - after: String - before: String - first: Int - last: Int - orderBy: AnswerOrder! - ): AnswerConnection! -} diff --git a/extends/authors.graphql b/extends/authors.graphql index 2ff0cb7..465d5cd 100644 --- a/extends/authors.graphql +++ b/extends/authors.graphql @@ -9,33 +9,3 @@ type Author implements Node { id: ID! name: String! } -type AuthorEdge implements Edge { - cursor: String! - node: Author! -} - -type AuthorConnection implements Connection { - edges: [AuthorEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -enum AuthorOrderField { - TITLE - CREATED_AT -} - -input AuthorOrder { - field: BookOrderField! - order: OrderDirection! -} - -extend type Query { - manyAuthors( - after: String - before: String - first: Int - last: Int - orderBy: AuthorOrder! - ): AuthorConnection! -} diff --git a/extends/book.graphql b/extends/book.graphql index 9264fe1..08a3837 100644 --- a/extends/book.graphql +++ b/extends/book.graphql @@ -4,34 +4,3 @@ extend type Book { isbn: String cover: String } - -type BookEdge implements Edge { - cursor: String! - node: Book! -} - -type BookConnection implements Connection { - edges: [BookEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -enum BookOrderField { - TITLE - CREATED_AT -} - -input BookOrder { - field: BookOrderField! - order: OrderDirection! -} - -extend type Query { - manyBooks( - after: String - before: String - first: Int - last: Int - orderBy: BookOrder! - ): BookConnection! -} diff --git a/extends/bookseries.graphql b/extends/bookseries.graphql index 88e2941..e6bc824 100644 --- a/extends/bookseries.graphql +++ b/extends/bookseries.graphql @@ -1,34 +1,3 @@ extend type BookSeries { title: String! } - -type BookSeriesEdge implements Edge { - cursor: String! - node: BookSeries! -} - -type BookSeriesConnection implements Connection { - edges: [BookSeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -enum BookSeriesOrderField { - TITLE - CREATED_AT -} - -input BookSeriesOrder { - field: BookOrderField! - order: OrderDirection! -} - -extend type Query { - manyBookSeries( - after: String - before: String - first: Int - last: Int - orderBy: BookSeriesOrder! - ): BookSeriesConnection! -} diff --git a/extends/henken.graphql b/extends/henken.graphql deleted file mode 100644 index b418caf..0000000 --- a/extends/henken.graphql +++ /dev/null @@ -1,9 +0,0 @@ -extend type Query { - manyHenkens( - after: String - before: String - first: Int - last: Int - orderBy: HenkenOrder! - ): HenkenConnection! -} diff --git a/extends/user.graphql b/extends/user.graphql index a33efe6..8717324 100644 --- a/extends/user.graphql +++ b/extends/user.graphql @@ -1,35 +1,4 @@ extend type User { - alias: String! displayName: String! avatar: String! } - -type UserEdge implements Edge { - cursor: String! - node: User! -} - -type UserConnection implements Connection { - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! -} - -enum UserOrderField { - CREATED_AT -} - -input UserOrder { - field: BookOrderField! - order: OrderDirection! -} - -extend type Query { - manyUsers( - after: String - before: String - first: Int - last: Int - orderBy: UserOrder! - ): UserConnection! -} diff --git a/schema.graphql b/schema.graphql index e0a9a72..d4c446b 100644 --- a/schema.graphql +++ b/schema.graphql @@ -33,7 +33,7 @@ enum AnswerType { WRONG } -type Author implements Node { +type Author implements Content & Node { books(after: String, before: String, first: Int, last: Int, order: BookOrder!): BookConnection! id: ID! name: String! @@ -51,13 +51,12 @@ type AuthorEdge implements Edge { } input AuthorOrder { - field: BookOrderField! - order: OrderDirection! + direction: OrderDirection! + field: AuthorOrderField! } enum AuthorOrderField { - CREATED_AT - TITLE + LINKED_HENKENS } type Book implements Content & Node { @@ -79,13 +78,12 @@ type BookEdge implements Edge { } input BookOrder { + direction: OrderDirection! field: BookOrderField! - order: OrderDirection! } enum BookOrderField { - CREATED_AT - TITLE + LINKED_HENKENS } type BookSeries implements Content & Node { @@ -105,13 +103,12 @@ type BookSeriesEdge implements Edge { } input BookSeriesOrder { - field: BookOrderField! - order: OrderDirection! + direction: OrderDirection! + field: BookSeriesOrderField! } enum BookSeriesOrderField { - CREATED_AT - TITLE + LINKED_HENKENS } interface Connection { @@ -144,6 +141,10 @@ type FindAnswerPayload { answer: Answer } +type FindAuthorPayload { + author: Author +} + type FindBookPayload { book: Book } @@ -244,9 +245,11 @@ type PageInfo { type Query { answer(id: ID!): Answer! + author(id: ID!): Author! book(id: ID!): Book! bookSeries(id: ID!): BookSeries! findAnswer(id: ID!): FindAnswerPayload! + findAuthor(id: ID!): FindAuthorPayload! findBook(id: ID!): FindBookPayload! findBookSeries(id: ID!): FindBookSeriesPayload! findHenken(id: ID!): FindHenkenPayload! @@ -342,8 +345,8 @@ type UserEdge implements Edge { } input UserOrder { - field: BookOrderField! - order: OrderDirection! + direction: OrderDirection! + field: UserOrderField! } enum UserOrderField { From 150fec279d7769ae65c9f9a396a73e1ff86a918e Mon Sep 17 00:00:00 2001 From: SnO2WMaN Date: Wed, 6 Oct 2021 20:14:51 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=E3=81=A1=E3=82=87=E3=81=A3=E3=81=A8?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extends/authors.graphql | 1 - extends/book.graphql | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/extends/authors.graphql b/extends/authors.graphql index 465d5cd..b1cbf6c 100644 --- a/extends/authors.graphql +++ b/extends/authors.graphql @@ -6,6 +6,5 @@ type Author implements Node { last: Int order: BookOrder! ): BookConnection! - id: ID! name: String! } diff --git a/extends/book.graphql b/extends/book.graphql index 08a3837..a87a9d7 100644 --- a/extends/book.graphql +++ b/extends/book.graphql @@ -3,4 +3,6 @@ extend type Book { isbn: String cover: String + + authors: [Author!]! } From c3bce9b3e3104b9c4df974ae64b9478355837c24 Mon Sep 17 00:00:00 2001 From: SnO2WMaN Date: Wed, 6 Oct 2021 20:31:04 +0900 Subject: [PATCH 4/5] =?UTF-8?q?bff=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bff b/bff index be56e40..d8b6306 160000 --- a/bff +++ b/bff @@ -1 +1 @@ -Subproject commit be56e40bfca6e8427bf22a8aa87efab847364a09 +Subproject commit d8b6306d1ddb23e072a28612d4deea3a48cb1ab5 From 103983695d45b55d33db3c3cb53d329bf13287a0 Mon Sep 17 00:00:00 2001 From: SnO2WMaN Date: Wed, 6 Oct 2021 20:32:44 +0900 Subject: [PATCH 5/5] updupdupd2 --- schema.graphql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/schema.graphql b/schema.graphql index d4c446b..4e1e83a 100644 --- a/schema.graphql +++ b/schema.graphql @@ -60,6 +60,7 @@ enum AuthorOrderField { } type Book implements Content & Node { + authors: [Author!]! cover: String id: ID! isbn: String @@ -121,7 +122,7 @@ interface Content { id: ID! } -union ContentUnion = Book | BookSeries +union ContentUnion = Author | Book | BookSeries type CreateHenkenPayload { henken: Henken!