mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
#6732 - Add graphql support for new ASN model and fix ASN overflow on longs
This commit is contained in:
5
netbox/ipam/graphql/scalars.py
Normal file
5
netbox/ipam/graphql/scalars.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from netbox.graphql.scalars import BigInt
|
||||
|
||||
|
||||
class ASNField(BigInt):
|
||||
pass
|
@@ -1,4 +1,7 @@
|
||||
import graphene
|
||||
|
||||
from ipam import filtersets, models
|
||||
from ipam.graphql.scalars import ASNField
|
||||
from netbox.graphql.types import OrganizationalObjectType, PrimaryObjectType
|
||||
|
||||
__all__ = (
|
||||
@@ -18,6 +21,7 @@ __all__ = (
|
||||
|
||||
|
||||
class ASNType(PrimaryObjectType):
|
||||
asn = graphene.Field(ASNField)
|
||||
|
||||
class Meta:
|
||||
model = models.ASN
|
||||
|
Reference in New Issue
Block a user