Skip to content

Commit 5e8d1a8

Browse files
committed
Change zone gql selections to only select what's used/needed
1 parent b920727 commit 5e8d1a8

File tree

4 files changed

+11
-14
lines changed

4 files changed

+11
-14
lines changed

src/common/fragments/location.graphql

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,7 @@ fragment DisplayFieldRegion on FieldRegion {
3434

3535
fragment DisplayFieldZone on FieldZone {
3636
id
37-
createdAt
3837
name {
39-
canRead
40-
canEdit
4138
value
4239
}
43-
director {
44-
canRead
45-
canEdit
46-
value {
47-
id
48-
fullName
49-
}
50-
}
5140
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mutation UpdateFieldZone($input: UpdateFieldZoneInput!) {
22
updateFieldZone(input: $input) {
33
fieldZone {
4-
...DisplayFieldZone
4+
...FieldZoneForm
55
}
66
}
77
}
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
query FieldZoneDetail($fieldZoneId: ID!) {
22
fieldZone(id: $fieldZoneId) {
3-
...DisplayFieldZone
3+
name {
4+
value
5+
}
6+
director {
7+
value {
8+
id
9+
fullName
10+
}
11+
}
412
...FieldZoneForm
513
}
614
}

src/scenes/FieldZones/Detail/FieldZoneDetail.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const FieldZoneDetail = () => {
6262
variant="h2"
6363
sx={{
6464
mr: 4,
65-
width: !fieldZone?.name ? '40%' : undefined,
65+
width: !fieldZone?.name.value ? '40%' : undefined,
6666
}}
6767
>
6868
{!fieldZone ? (

0 commit comments

Comments
 (0)