moving dataconnect to dev

This commit is contained in:
José Salazar
2026-01-19 19:18:11 -05:00
parent 6960e9e472
commit c5afbd99cd
147 changed files with 10531 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
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)
}

View File

@@ -0,0 +1,64 @@
query listAccounts @auth(level: USER) {
accounts {
id
bank
type
last4
isPrimary
ownerId
createdAt
updatedAt
createdBy
}
}
query getAccountById($id: UUID!) @auth(level: USER) {
account(id: $id) {
id
bank
type
last4
isPrimary
ownerId
createdAt
updatedAt
createdBy
}
}
query getAccountsByOwnerId($ownerId: UUID!) @auth(level: USER) {
accounts(where: { ownerId: { eq: $ownerId } }) {
id
bank
type
last4
isPrimary
ownerId
createdAt
updatedAt
createdBy
}
}
query filterAccounts(
$bank: String
$type: AccountType
$isPrimary: Boolean
$ownerId: UUID
) @auth(level: USER) {
accounts(
where: {
bank: { eq: $bank }
type: { eq: $type }
isPrimary: { eq: $isPrimary }
ownerId: { eq: $ownerId }
}
) {
id
bank
type
last4
isPrimary
ownerId
}
}