13 lines
625 B
Python
13 lines
625 B
Python
import strawberry
|
|
import strawberry_django as sd
|
|
from typing import List, Optional
|
|
from core.graphql.types.customer import CustomerType, CustomerAddressType, CustomerContactType
|
|
from core.graphql.filters.customer import CustomerFilter, CustomerContactFilter
|
|
|
|
@strawberry.type
|
|
class Query:
|
|
customer: Optional[CustomerType] = sd.node()
|
|
customer_address: Optional[CustomerAddressType] = sd.node()
|
|
customer_contact: Optional[CustomerContactType] = sd.node()
|
|
customers: List[CustomerType] = sd.field(filters=CustomerFilter)
|
|
customer_contacts: List[CustomerContactType] = sd.field(filters=CustomerContactFilter) |