40 lines
657 B
GraphQL
40 lines
657 B
GraphQL
mutation createAccount(
|
|
$bank: String!
|
|
$type: AccountType!
|
|
$last4: String!
|
|
$isPrimary: Boolean
|
|
$ownerId: UUID!
|
|
) @auth(level: USER) {
|
|
account_insert(
|
|
data: {
|
|
bank: $bank
|
|
type: $type
|
|
last4: $last4
|
|
isPrimary: $isPrimary
|
|
ownerId: $ownerId
|
|
}
|
|
)
|
|
}
|
|
|
|
mutation updateAccount(
|
|
$id: UUID!
|
|
$bank: String
|
|
$type: AccountType
|
|
$last4: String
|
|
$isPrimary: Boolean
|
|
) @auth(level: USER) {
|
|
account_update(
|
|
id: $id
|
|
data: {
|
|
bank: $bank
|
|
type: $type
|
|
last4: $last4
|
|
isPrimary: $isPrimary
|
|
}
|
|
)
|
|
}
|
|
|
|
mutation deleteAccount($id: UUID!) @auth(level: USER) {
|
|
account_delete(id: $id)
|
|
}
|