Task: Upgraded the dgs graphql to submodules and parent modules for extends projects

This commit is contained in:
2021-08-08 12:33:34 +07:00
parent 83477a9946
commit 32f356569d
39 changed files with 170 additions and 58 deletions

View 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
}

View 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
}

View 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!
}

View 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
}