# graph/schema/nodes.py (illustrative excerpt) NODE_DEFINITIONS = { "Company": { "ticker": "STRING", "isin": "STRING", "name": "STRING", "sector": "STRING", "market_cap": "DOUBLE", "last_updated": "TIMESTAMP", }, "ResearchNote": { "note_id": "STRING", "title": "STRING", "published_date": "DATE", "sentiment": "STRING", "word_count": "INT64", }, "MaterialEvent": { "event_id": "STRING", "event_type": "STRING", "event_date": "TIMESTAMP", "headline": "STRING", "source": "STRING", }, } COMMAND_BLOCK: # graph/schema/nodes.py (illustrative excerpt) NODE_DEFINITIONS = { "Company": { "ticker": "STRING", "isin": "STRING", "name": "STRING", "sector": "STRING", "market_cap": "DOUBLE", "last_updated": "TIMESTAMP", }, "ResearchNote": { "note_id": "STRING", "title": "STRING", "published_date": "DATE", "sentiment": "STRING", "word_count": "INT64", }, "MaterialEvent": { "event_id": "STRING", "event_type": "STRING", "event_date": "TIMESTAMP", "headline": "STRING", "source": "STRING", }, } COMMAND_BLOCK: # graph/schema/nodes.py (illustrative excerpt) NODE_DEFINITIONS = { "Company": { "ticker": "STRING", "isin": "STRING", "name": "STRING", "sector": "STRING", "market_cap": "DOUBLE", "last_updated": "TIMESTAMP", }, "ResearchNote": { "note_id": "STRING", "title": "STRING", "published_date": "DATE", "sentiment": "STRING", "word_count": "INT64", }, "MaterialEvent": { "event_id": "STRING", "event_type": "STRING", "event_date": "TIMESTAMP", "headline": "STRING", "source": "STRING", }, } COMMAND_BLOCK: # api/routers/companies.py (illustrative pattern) @router.get("/{ticker}/snapshot") async def get_company_snapshot( ticker: str, -weight: 500;">service: CompanyService = Depends(get_company_service), ): snapshot = await -weight: 500;">service.get_full_snapshot(ticker) if not snapshot: raise HTTPException(status_code=404, detail="Company not found") return snapshot COMMAND_BLOCK: # api/routers/companies.py (illustrative pattern) @router.get("/{ticker}/snapshot") async def get_company_snapshot( ticker: str, -weight: 500;">service: CompanyService = Depends(get_company_service), ): snapshot = await -weight: 500;">service.get_full_snapshot(ticker) if not snapshot: raise HTTPException(status_code=404, detail="Company not found") return snapshot COMMAND_BLOCK: # api/routers/companies.py (illustrative pattern) @router.get("/{ticker}/snapshot") async def get_company_snapshot( ticker: str, -weight: 500;">service: CompanyService = Depends(get_company_service), ): snapshot = await -weight: 500;">service.get_full_snapshot(ticker) if not snapshot: raise HTTPException(status_code=404, detail="Company not found") return snapshot CODE_BLOCK: MATCH (a:Analyst)-[:AUTHORED]->(n:ResearchNote)-[:COVERS]->(c:Company)-[:IN_SECTOR]->(s:Sector) OPTIONAL MATCH (n)-[:REFERENCES]->(e:MaterialEvent) WHERE s.name = $sector_name RETURN a.name, n.title, n.published_date, c.ticker, e.headline ORDER BY n.published_date DESC CODE_BLOCK: MATCH (a:Analyst)-[:AUTHORED]->(n:ResearchNote)-[:COVERS]->(c:Company)-[:IN_SECTOR]->(s:Sector) OPTIONAL MATCH (n)-[:REFERENCES]->(e:MaterialEvent) WHERE s.name = $sector_name RETURN a.name, n.title, n.published_date, c.ticker, e.headline ORDER BY n.published_date DESC CODE_BLOCK: MATCH (a:Analyst)-[:AUTHORED]->(n:ResearchNote)-[:COVERS]->(c:Company)-[:IN_SECTOR]->(s:Sector) OPTIONAL MATCH (n)-[:REFERENCES]->(e:MaterialEvent) WHERE s.name = $sector_name RETURN a.name, n.title, n.published_date, c.ticker, e.headline ORDER BY n.published_date DESC