-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.gql
73 lines (62 loc) · 1.5 KB
/
schema.gql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------
type TransactionEntity {
id: ID!
date: DateTime!
amount: Float!
balance: BalanceEntity!
}
"""
A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
"""
scalar DateTime
type BalanceEntity {
id: ID!
amount: Float!
transactions: [TransactionEntity!]!
}
type UserEntity {
id: ID!
name: String!
balance: BalanceEntity!
}
type AuthPayload {
user: UserEntity!
token: String!
}
type Query {
user(id: ID!): UserEntity!
balance(id: ID!): BalanceEntity!
transaction(id: ID!): TransactionEntity!
}
type Mutation {
userUpdate(updateUserInput: UpdateUserInput!): UserEntity!
register(credentials: RegisterInput!): AuthPayload!
login(credentials: AuthCredentialsInput!): AuthPayload!
logout: Boolean!
changePassword(newPassword: String!): AuthPayload!
forgotPassword(username: String!): Boolean!
withdraw(amount: Int!): BalanceEntity!
deposit(amount: Int!): BalanceEntity!
create: BalanceEntity!
createTransaction(createTransactionInput: CreateTransactionInput!): TransactionEntity!
}
input UpdateUserInput {
name: String
email: String
}
input RegisterInput {
username: String!
password: String!
email: String!
}
input AuthCredentialsInput {
username: String!
password: String!
}
input CreateTransactionInput {
date: DateTime!
amount: Float!
balanceId: String!
}