mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-17 04:32:51 -06:00
9856 fix plugin schema
This commit is contained in:
parent
ccc81e73d1
commit
f960d5a482
@ -73,7 +73,7 @@ def register_graphql_schema(graphql_schema):
|
||||
"""
|
||||
Register a GraphQL schema class for inclusion in NetBox's GraphQL API.
|
||||
"""
|
||||
registry['plugins']['graphql_schemas'].append(graphql_schema)
|
||||
registry['plugins']['graphql_schemas'].extend(graphql_schema)
|
||||
|
||||
|
||||
def register_user_preferences(plugin_name, preferences):
|
||||
|
@ -14,7 +14,6 @@ class DummyModelType:
|
||||
pass
|
||||
|
||||
|
||||
"""
|
||||
@strawberry.type
|
||||
class DummyQuery:
|
||||
@strawberry.field
|
||||
@ -22,18 +21,7 @@ class DummyQuery:
|
||||
return None
|
||||
dummymodel_list: List[DummyModelType] = strawberry_django.field()
|
||||
|
||||
schema = strawberry.Schema(
|
||||
query=DummyQuery,
|
||||
# config=StrawberryConfig(auto_camel_case=False),
|
||||
)
|
||||
"""
|
||||
|
||||
|
||||
@strawberry.type
|
||||
class Query:
|
||||
fruits: list[int] = strawberry_django.field()
|
||||
|
||||
|
||||
schema2 = strawberry.Schema(
|
||||
query=Query,
|
||||
)
|
||||
schema = [
|
||||
DummyQuery,
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user