Skip to content

Commit a978d1c

Browse files
committed
feat(graphql): Add related rule queries to AccessListType
Extends the GraphQL schema by adding `aclstandardrules` and `aclextendedrules` as related fields to `AccessListType`. This enables retrieving associated Standard and Extended Rules in a single query.
1 parent ed73288 commit a978d1c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

netbox_acls/graphql/types.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ class AccessListType(NetBoxObjectType):
3333
strawberry.union("ACLAssignmentType"),
3434
]
3535

36+
# Related models
37+
aclstandardrules: List[
38+
Annotated[
39+
"ACLStandardRuleType",
40+
strawberry.lazy("netbox_acls.graphql.types"),
41+
]
42+
]
43+
aclextendedrules: List[
44+
Annotated[
45+
"ACLExtendedRuleType",
46+
strawberry.lazy("netbox_acls.graphql.types"),
47+
]
48+
]
49+
3650

3751
@strawberry_django.type(
3852
models.ACLInterfaceAssignment,

0 commit comments

Comments
 (0)