Skip to content

Commit 8d97731

Browse files
authored
chore(condo): add first to contact queries (#5909)
1 parent 83c5a22 commit 8d97731

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

apps/condo/domains/contact/queries/Contact.graphql

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
query getContactById ($id: ID!) {
22
contacts: allContacts(
33
where: { id: $id }
4+
first: 1
45
) {
56
id
67
name
@@ -26,6 +27,7 @@ query getContactById ($id: ID!) {
2627
query getContactByUnit ($propertyId: ID!, $unitName: String!, $unitType: ContactUnitTypeType!) {
2728
contacts: allContacts(
2829
where: { unitName: $unitName, unitType: $unitType, property: { id: $propertyId } }
30+
first: 50
2931
) {
3032
id
3133
name

apps/condo/gql/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ export type GetProcessingTasksSuspenseQueryHookResult = ReturnType<typeof useGet
485485
export type GetProcessingTasksQueryResult = Apollo.QueryResult<Types.GetProcessingTasksQuery, Types.GetProcessingTasksQueryVariables>;
486486
export const GetContactByIdDocument = gql`
487487
query getContactById($id: ID!) {
488-
contacts: allContacts(where: {id: $id}) {
488+
contacts: allContacts(where: {id: $id}, first: 1) {
489489
id
490490
name
491491
email
@@ -544,6 +544,7 @@ export const GetContactByUnitDocument = gql`
544544
query getContactByUnit($propertyId: ID!, $unitName: String!, $unitType: ContactUnitTypeType!) {
545545
contacts: allContacts(
546546
where: {unitName: $unitName, unitType: $unitType, property: {id: $propertyId}}
547+
first: 50
547548
) {
548549
id
549550
name

0 commit comments

Comments
 (0)