# Generated by ariadne-codegen
# Source: ./documents

from typing import Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import EntityTypes


class QueryGraph(BaseModel):
    graph: Optional["QueryGraphGraph"]


class QueryGraphGraph(BaseModel):
    nodes: Optional[list[Optional["QueryGraphGraphNodes"]]]
    edges: Optional[list[Optional["QueryGraphGraphEdges"]]]


class QueryGraphGraphNodes(BaseModel):
    id: str
    name: str
    type: EntityTypes
    metadata: Optional[str]


class QueryGraphGraphEdges(BaseModel):
    from_: str = Field(alias="from")
    to: str
    relation: Optional[str]


QueryGraph.model_rebuild()
QueryGraphGraph.model_rebuild()
