mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-15 20:18:17 -06:00
Also replace typing.List with list in graphql-api.md
This commit is contained in:
parent
1b15b381bb
commit
7eb1eb32ac
@ -8,7 +8,6 @@ A plugin can extend NetBox's GraphQL API by registering its own schema class. By
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
# graphql.py
|
# graphql.py
|
||||||
from typing import List
|
|
||||||
import strawberry
|
import strawberry
|
||||||
import strawberry_django
|
import strawberry_django
|
||||||
|
|
||||||
@ -28,7 +27,7 @@ class MyQuery:
|
|||||||
@strawberry.field
|
@strawberry.field
|
||||||
def dummymodel(self, id: int) -> DummyModelType:
|
def dummymodel(self, id: int) -> DummyModelType:
|
||||||
return None
|
return None
|
||||||
dummymodel_list: List[DummyModelType] = strawberry_django.field()
|
dummymodel_list: list[DummyModelType] = strawberry_django.field()
|
||||||
|
|
||||||
|
|
||||||
schema = [
|
schema = [
|
||||||
|
Loading…
Reference in New Issue
Block a user