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

from typing import Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import EntityTypes


class QueryFactsGraph(BaseModel):
    facts: Optional["QueryFactsGraphFacts"]


class QueryFactsGraphFacts(BaseModel):
    graph: Optional["QueryFactsGraphFactsGraph"]


class QueryFactsGraphFactsGraph(BaseModel):
    nodes: Optional[list[Optional["QueryFactsGraphFactsGraphNodes"]]]
    edges: Optional[list[Optional["QueryFactsGraphFactsGraphEdges"]]]


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


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


QueryFactsGraph.model_rebuild()
QueryFactsGraphFacts.model_rebuild()
QueryFactsGraphFactsGraph.model_rebuild()
