13 lines
606 B
Python
13 lines
606 B
Python
import strawberry
|
|
import strawberry_django as sd
|
|
from typing import List, Optional
|
|
from core.graphql.types.account import AccountType, AccountAddressType, AccountContactType
|
|
from core.graphql.filters.account import AccountFilter, AccountContactFilter
|
|
|
|
@strawberry.type
|
|
class Query:
|
|
account: Optional[AccountType] = sd.node()
|
|
account_address: Optional[AccountAddressType] = sd.node()
|
|
account_contact: Optional[AccountContactType] = sd.node()
|
|
accounts: List[AccountType] = sd.field(filters=AccountFilter)
|
|
account_contacts: List[AccountContactType] = sd.field(filters=AccountContactFilter) |