Task: Upgraded the dgs graphql to submodules and parent modules for extends projects
This commit is contained in:
26
dgs-graphql/src/main/resources/schema/account.graphql
Normal file
26
dgs-graphql/src/main/resources/schema/account.graphql
Normal file
@@ -0,0 +1,26 @@
|
||||
enum AccountType {
|
||||
BASIC
|
||||
PREMIUM
|
||||
BUSINESS
|
||||
}
|
||||
|
||||
enum AccountCurrency {
|
||||
USD
|
||||
KHR
|
||||
}
|
||||
|
||||
type Account {
|
||||
id: ID
|
||||
code: String
|
||||
balance: Float
|
||||
currentBalance: Float
|
||||
type: AccountType
|
||||
currency: AccountCurrency
|
||||
user: User!
|
||||
}
|
||||
|
||||
input AccountInput {
|
||||
userId: Int
|
||||
type: AccountType
|
||||
currency: AccountCurrency
|
||||
}
|
||||
16
dgs-graphql/src/main/resources/schema/expense.graphql
Normal file
16
dgs-graphql/src/main/resources/schema/expense.graphql
Normal file
@@ -0,0 +1,16 @@
|
||||
input ExpenseFilter {
|
||||
isIncome: Boolean
|
||||
}
|
||||
|
||||
type Expense {
|
||||
id: ID
|
||||
description: String
|
||||
amount: Int
|
||||
isIncome: Boolean
|
||||
}
|
||||
|
||||
type ExpensePage {
|
||||
list: [Expense]
|
||||
totalPages: Int
|
||||
currentPage: Int
|
||||
}
|
||||
21
dgs-graphql/src/main/resources/schema/schema.graphqls
Normal file
21
dgs-graphql/src/main/resources/schema/schema.graphqls
Normal file
@@ -0,0 +1,21 @@
|
||||
type Query {
|
||||
hello: String
|
||||
|
||||
helloByName(name: String!): String
|
||||
|
||||
fetchUsers: [User]!
|
||||
|
||||
fetchAccounts: [Account]!
|
||||
|
||||
fetchExpenses(filter: ExpenseFilter, pageNumber: Int, pageSize: Int) : ExpensePage
|
||||
}
|
||||
|
||||
type Subscription {
|
||||
hello: Int
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
createUser(input: UserInput): User!
|
||||
|
||||
openAccount(input: AccountInput): Account!
|
||||
}
|
||||
14
dgs-graphql/src/main/resources/schema/user.graphql
Normal file
14
dgs-graphql/src/main/resources/schema/user.graphql
Normal file
@@ -0,0 +1,14 @@
|
||||
type User {
|
||||
id: ID
|
||||
code: String
|
||||
username: String
|
||||
name: String
|
||||
enabled: Boolean
|
||||
}
|
||||
|
||||
input UserInput {
|
||||
username: String
|
||||
password: String
|
||||
name: String
|
||||
enabled: Boolean
|
||||
}
|
||||
Reference in New Issue
Block a user