adding new filds to account

This commit is contained in:
José Salazar
2026-01-26 13:49:57 -05:00
parent 2f5c607996
commit 42a11590f1
3 changed files with 18 additions and 6 deletions

View File

@@ -4,6 +4,8 @@ mutation createAccount(
$last4: String!
$isPrimary: Boolean
$ownerId: UUID!
$accountNumber: String
$routeNumber: String
) @auth(level: USER) {
account_insert(
data: {
@@ -12,6 +14,8 @@ mutation createAccount(
last4: $last4
isPrimary: $isPrimary
ownerId: $ownerId
accountNumber: $accountNumber
routeNumber: $routeNumber
}
)
}
@@ -22,6 +26,8 @@ mutation updateAccount(
$type: AccountType
$last4: String
$isPrimary: Boolean
$accountNumber: String
$routeNumber: String
) @auth(level: USER) {
account_update(
id: $id
@@ -30,6 +36,8 @@ mutation updateAccount(
type: $type
last4: $last4
isPrimary: $isPrimary
accountNumber: $accountNumber
routeNumber: $routeNumber
}
)
}

View File

@@ -6,9 +6,9 @@ query listAccounts @auth(level: USER) {
last4
isPrimary
ownerId
accountNumber
routeNumber
createdAt
updatedAt
createdBy
}
}
@@ -20,9 +20,9 @@ query getAccountById($id: UUID!) @auth(level: USER) {
last4
isPrimary
ownerId
accountNumber
routeNumber
createdAt
updatedAt
createdBy
}
}
@@ -34,9 +34,9 @@ query getAccountsByOwnerId($ownerId: UUID!) @auth(level: USER) {
last4
isPrimary
ownerId
accountNumber
routeNumber
createdAt
updatedAt
createdBy
}
}
@@ -60,5 +60,7 @@ query filterAccounts(
last4
isPrimary
ownerId
accountNumber
routeNumber
}
}

View File

@@ -10,6 +10,8 @@ type Account @table(name: "accounts") {
type: AccountType!
last4: String!
isPrimary: Boolean
accountNumber: String
routeNumber: String
ownerId: UUID! #staff/business
createdAt: Timestamp @default(expr: "request.time")
updatedAt: Timestamp @default(expr: "request.time")