mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
* 9468 add link_peer to GraphQL * 9478 add class_type * 9478 fix tests * 9478 fix tests * 9478 fix tests
13 lines
294 B
Python
13 lines
294 B
Python
import graphene
|
|
|
|
|
|
class CabledObjectMixin:
|
|
link_peers = graphene.List('dcim.graphql.gfk_mixins.LinkPeerType')
|
|
|
|
def resolve_cable_end(self, info):
|
|
# Handle empty values
|
|
return self.cable_end or None
|
|
|
|
def resolve_link_peers(self, info):
|
|
return self.link_peers
|