queries of taxt form

This commit is contained in:
José Salazar
2026-01-28 20:20:01 -05:00
parent 10b3cc8a0d
commit 1ab1c5b681

View File

@@ -1,13 +1,47 @@
query listTaxForms @auth(level: USER) {
taxForms { # ==========================================================
# TAX FORM - QUERIES (USE where, NOT filter)
# Include ALL fields from the new TaxForm type
# ==========================================================
query listTaxForms($offset: Int, $limit: Int) @auth(level: USER) {
taxForms(offset: $offset, limit: $limit, orderBy: { createdAt: DESC }) {
id id
formType formType
title firstName
subtitle lastName
description mInitial
oLastName
dob
socialSN
email
phone
address
city
apt
state
zipCode
marital
multipleJob
childrens
otherDeps
totalCredits
otherInconme
deductions
extraWithholding
citizen
uscis
passportNumber
countryIssue
prepartorOrTranslator
signature
date
status status
staffId staffId
formData
createdAt createdAt
updatedAt updatedAt
createdBy createdBy
@@ -18,38 +52,105 @@ query getTaxFormById($id: UUID!) @auth(level: USER) {
taxForm(id: $id) { taxForm(id: $id) {
id id
formType formType
title firstName
subtitle lastName
description mInitial
oLastName
dob
socialSN
email
phone
address
city
apt
state
zipCode
marital
multipleJob
childrens
otherDeps
totalCredits
otherInconme
deductions
extraWithholding
citizen
uscis
passportNumber
countryIssue
prepartorOrTranslator
signature
date
status status
staffId staffId
formData
createdAt createdAt
updatedAt updatedAt
createdBy createdBy
} }
} }
query getTaxFormsBystaffId($staffId: UUID!) @auth(level: USER) { query getTaxFormsByStaffId(
taxForms(where: { staffId: { eq: $staffId } }) { $staffId: UUID!
$offset: Int
$limit: Int
) @auth(level: USER) {
taxForms(
where: { staffId: { eq: $staffId } }
offset: $offset
limit: $limit
orderBy: { createdAt: DESC }
) {
id id
formType formType
title firstName
subtitle lastName
description mInitial
oLastName
dob
socialSN
email
phone
address
city
apt
state
zipCode
marital
multipleJob
childrens
otherDeps
totalCredits
otherInconme
deductions
extraWithholding
citizen
uscis
passportNumber
countryIssue
prepartorOrTranslator
signature
date
status status
staffId staffId
formData
createdAt createdAt
updatedAt updatedAt
createdBy createdBy
} }
} }
query filterTaxForms( query listTaxFormsWhere(
$formType: TaxFormType $formType: TaxFormType
$status: TaxFormStatus $status: TaxFormStatus
$staffId: UUID $staffId: UUID
$offset: Int
$limit: Int
) @auth(level: USER) { ) @auth(level: USER) {
taxForms( taxForms(
where: { where: {
@@ -57,11 +158,48 @@ query filterTaxForms(
status: { eq: $status } status: { eq: $status }
staffId: { eq: $staffId } staffId: { eq: $staffId }
} }
offset: $offset
limit: $limit
orderBy: { createdAt: DESC }
) { ) {
id id
formType formType
title firstName
lastName
mInitial
oLastName
dob
socialSN
email
phone
address
city
apt
state
zipCode
marital
multipleJob
childrens
otherDeps
totalCredits
otherInconme
deductions
extraWithholding
citizen
uscis
passportNumber
countryIssue
prepartorOrTranslator
signature
date
status status
staffId staffId
createdAt
updatedAt
createdBy
} }
} }