-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
112 lines (97 loc) · 1.7 KB
/
schema.graphql
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
input Items {
itemId: String!
accounts: [String!]!
}
input FilterToken {
match: String!
matchPath: String!
}
enum GroupBy {
TRANSACTION
DAY
WEEK
MONTH
CATEGORY_1
CATEGORY_2
NAME
}
enum SortBy {
DATE
AMOUNT
}
enum Sort {
ASC
DESC
}
type User {
id: ID!
username: String!
plaidAcc: String
items(containsid: [ID]): [PlaidItem]
getTransaction(
items: [Items]
startDate: String!
endDate: String!
filter: [FilterToken]
group: GroupBy
sortBy: SortBy
sort: Sort
skip: Int
take: Int
max: Int
min: Int
): [TransactionResult]
}
union TransactionResult = Transaction | Group
type Query @auth {
getuser: User!
}
type PlaidItem {
itemId: ID!
name: String!
accounts: [Account]!
}
type Account {
account_id: String!
name: String!
}
type Transaction {
transaction_id: ID!
account_id: String!
type: String!
date: String!
iso_currency_code: String!
category: [String!]!
amount: Float!
payment_channel: String!
merchant_name: String
}
type Group {
groupid: ID!
amount: Float!
transactions: [Transaction]
}
type LinkToken {
expiration: String!
link_token: String!
request_id: String!
status_code: Int!
}
type TransactionUpdate {
webhook_code: String!
item_id: String!
error: String
new_transactions: Int
}
type Mutation {
login(username: String!, password: String!): Boolean!
signup(username: String!, password: String!): Boolean!
updatePreference(plaidAcc: String!): Boolean! @auth
signout: Boolean! @auth
createLinkToken: LinkToken @auth
setAccessToken(token: String): Boolean! @auth
testWebHook: Boolean @auth
}
type Subscription {
transactionUpdate(items: [Items]): TransactionUpdate
}