nexus-5/core/graphql/queries/customer.py
2026-01-26 11:09:40 -05:00

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)