-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
NetBox version
4.4.2
Feature type
New functionality
Proposed functionality
It appears that when contacts were added to ASNs (https://github.com/netbox-community/netbox/pull/19981/files#diff-4419495314f6a8489168ea67c5790e89a976d66701250e3d2497f1561dcb781f) that it didn't include adding this data to the graphql responses.
I am by no means an expert in graphql or the Django Stawberry GraphQL library, but it appears this is a trivial fix to update netbox/netbox/ipam/graphql/types.py
from this:
class ASNType(NetBoxObjectType):
to:
class ASNType(NetBoxObjectType, ContactsMixin):
I have tested this locally and it appears to resolve the issue, and I can now get the contacts returned via the graphql API.
Happy to raise a PR if this acceptable.
(Please note I didn't see any other issues relating to this, so apologies if I missed something and it is a duplicate)
Use case
Allow graphql APIs users to get access to contacts for ASNs.
Database changes
No response
External dependencies
No response