Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bffによる最終暫定クエリ #36

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bff
Submodule bff updated 1 files
+87 −1 schema.graphql
9 changes: 0 additions & 9 deletions extends/answer.graphql

This file was deleted.

31 changes: 0 additions & 31 deletions extends/authors.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,5 @@ type Author implements Node {
last: Int
order: BookOrder!
): BookConnection!
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!
}
31 changes: 1 addition & 30 deletions extends/book.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,6 @@ 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!
authors: [Author!]!
}
31 changes: 0 additions & 31 deletions extends/bookseries.graphql
Original file line number Diff line number Diff line change
@@ -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!
}
9 changes: 0 additions & 9 deletions extends/henken.graphql

This file was deleted.

31 changes: 0 additions & 31 deletions extends/user.graphql
Original file line number Diff line number Diff line change
@@ -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!
}
34 changes: 19 additions & 15 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand All @@ -51,16 +51,16 @@ 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 {
authors: [Author!]!
cover: String
id: ID!
isbn: String
Expand All @@ -79,13 +79,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 {
Expand All @@ -105,13 +104,12 @@ type BookSeriesEdge implements Edge {
}

input BookSeriesOrder {
field: BookOrderField!
order: OrderDirection!
direction: OrderDirection!
field: BookSeriesOrderField!
}

enum BookSeriesOrderField {
CREATED_AT
TITLE
LINKED_HENKENS
}

interface Connection {
Expand All @@ -124,7 +122,7 @@ interface Content {
id: ID!
}

union ContentUnion = Book | BookSeries
union ContentUnion = Author | Book | BookSeries

type CreateHenkenPayload {
henken: Henken!
Expand All @@ -144,6 +142,10 @@ type FindAnswerPayload {
answer: Answer
}

type FindAuthorPayload {
author: Author
}

type FindBookPayload {
book: Book
}
Expand Down Expand Up @@ -244,9 +246,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!
Expand Down Expand Up @@ -342,8 +346,8 @@ type UserEdge implements Edge {
}

input UserOrder {
field: BookOrderField!
order: OrderDirection!
direction: OrderDirection!
field: UserOrderField!
}

enum UserOrderField {
Expand Down