-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Deployment Type
Self-hosted
NetBox Version
v3.6.6
Python Version
3.11
Steps to Reproduce
When performing GraphQL queries on interfaces the connected_endpoints property fails to "expand" when connected to ProviderNetwork objects (via circuits).
Editing dcim/graphql/gfk_mixins.py and adding ProviderNetwork/ProviderNetworkType to LinkPeerType allows the query to succeed.
Expected Behavior
The GraphQL API should include all supported connected_endpoints types or the cable trace (for GraphQL) stop at the CircuitTermination that is already listed in the schema for LinkPeerType.
Observed Behavior
The query
query{
interface_list(...) {
id
connected_endpoints{
... on CircuitTerminationType{
id
}
}
}
}
results in the following error message via the GraphQL API:
Abstract type 'LinkPeerType' must resolve to an Object type at runtime for field 'InterfaceType.connected_endpoints'. Either the 'LinkPeerType' type should provide a 'resolve_type' function or each possible type should provide an 'is_type_of' function.