3636)
3737from pyneo4j_ogm .fields .settings import NodeModelSettings , RelationshipModelSettings
3838from pyneo4j_ogm .logger import logger
39- from pyneo4j_ogm .queries .types import MultiHopFilters , NodeFilters , QueryOptions
39+ from pyneo4j_ogm .queries .types import (
40+ MultiHopFilters ,
41+ NodeFilters ,
42+ Projection ,
43+ QueryOptions ,
44+ )
4045
4146if TYPE_CHECKING :
4247 from pyneo4j_ogm .fields .relationship_property import RelationshipProperty
@@ -271,7 +276,7 @@ async def refresh(self) -> None:
271276 async def find_connected_nodes (
272277 self ,
273278 filters : MultiHopFilters ,
274- projections : Optional [Dict [ str , str ] ] = None ,
279+ projections : Optional [Projection ] = None ,
275280 options : Optional [QueryOptions ] = None ,
276281 auto_fetch_nodes : bool = False ,
277282 auto_fetch_models : Optional [List [Union [str , Type ["NodeModel" ]]]] = None ,
@@ -281,7 +286,7 @@ async def find_connected_nodes(
281286
282287 Args:
283288 filters (MultiHopFilters): The filters to apply to the query.
284- projections (Dict[str, str] , optional): The properties to project from the node. The keys define
289+ projections (Projection , optional): The properties to project from the node. The keys define
285290 the new keys in the projection and the value defines the model property to be projected. A invalid
286291 or empty projection will result in the whole model instance being returned. Defaults to `None`.
287292 options (QueryOptions, optional): The options to apply to the query. Defaults to `None`.
@@ -414,7 +419,7 @@ async def find_connected_nodes(
414419 async def find_one (
415420 cls : Type [T ],
416421 filters : NodeFilters ,
417- projections : Optional [Dict [ str , str ] ] = None ,
422+ projections : Optional [Projection ] = None ,
418423 auto_fetch_nodes : bool = False ,
419424 auto_fetch_models : Optional [List [Union [str , Type ["NodeModel" ]]]] = None ,
420425 raise_on_empty : bool = False ,
@@ -425,7 +430,7 @@ async def find_one(
425430
426431 Args:
427432 filters (NodeFilters): The filters to apply to the query.
428- projections (Dict[str, str] , optional): The properties to project from the node. The keys define
433+ projections (Projection , optional): The properties to project from the node. The keys define
429434 the new keys in the projection and the value defines the model property to be projected. A invalid
430435 or empty projection will result in the whole model instance being returned. Defaults to `None`.
431436 auto_fetch_nodes (bool, optional): Whether to automatically fetch connected nodes. Takes priority over the
@@ -542,7 +547,7 @@ async def find_one(
542547 async def find_many (
543548 cls : Type [T ],
544549 filters : Optional [NodeFilters ] = None ,
545- projections : Optional [Dict [ str , str ] ] = None ,
550+ projections : Optional [Projection ] = None ,
546551 options : Optional [QueryOptions ] = None ,
547552 auto_fetch_nodes : bool = False ,
548553 auto_fetch_models : Optional [List [Union [str , Type ["NodeModel" ]]]] = None ,
@@ -553,7 +558,7 @@ async def find_many(
553558
554559 Args:
555560 filters (NodeFilters, optional): The filters to apply to the query. Defaults to `None`.
556- projections (Dict[str, str] , optional): The properties to project from the node. The keys define
561+ projections (Projection , optional): The properties to project from the node. The keys define
557562 the new keys in the projection and the value defines the model property to be projected. A invalid
558563 or empty projection will result in the whole model instance being returned. Defaults to `None`.
559564 options (QueryOptions, optional): The options to apply to the query. Defaults to `None`.
0 commit comments