5151from .schema import InfrahubSchema , InfrahubSchemaSync , NodeSchemaAPI
5252from .store import NodeStore , NodeStoreSync
5353from .timestamp import Timestamp
54- from .types import AsyncRequester , HTTPMethod , SyncRequester
54+ from .types import AsyncRequester , HTTPMethod , OrderModel , SyncRequester
5555from .utils import decode_json , is_valid_uuid
5656
5757if TYPE_CHECKING :
@@ -540,6 +540,7 @@ async def all(
540540 fragment : bool = ...,
541541 prefetch_relationships : bool = ...,
542542 property : bool = ...,
543+ order : OrderModel | None = ...,
543544 ) -> list [SchemaType ]: ...
544545
545546 @overload
@@ -557,6 +558,7 @@ async def all(
557558 fragment : bool = ...,
558559 prefetch_relationships : bool = ...,
559560 property : bool = ...,
561+ order : OrderModel | None = ...,
560562 ) -> list [InfrahubNode ]: ...
561563
562564 async def all (
@@ -573,6 +575,7 @@ async def all(
573575 fragment : bool = False ,
574576 prefetch_relationships : bool = False ,
575577 property : bool = False ,
578+ order : OrderModel | None = None ,
576579 ) -> list [InfrahubNode ] | list [SchemaType ]:
577580 """Retrieve all nodes of a given kind
578581
@@ -605,6 +608,7 @@ async def all(
605608 fragment = fragment ,
606609 prefetch_relationships = prefetch_relationships ,
607610 property = property ,
611+ order = order ,
608612 )
609613
610614 @overload
@@ -623,6 +627,7 @@ async def filters(
623627 prefetch_relationships : bool = ...,
624628 partial_match : bool = ...,
625629 property : bool = ...,
630+ order : OrderModel | None = ...,
626631 ** kwargs : Any ,
627632 ) -> list [SchemaType ]: ...
628633
@@ -642,6 +647,7 @@ async def filters(
642647 prefetch_relationships : bool = ...,
643648 partial_match : bool = ...,
644649 property : bool = ...,
650+ order : OrderModel | None = ...,
645651 ** kwargs : Any ,
646652 ) -> list [InfrahubNode ]: ...
647653
@@ -660,6 +666,7 @@ async def filters(
660666 prefetch_relationships : bool = False ,
661667 partial_match : bool = False ,
662668 property : bool = False ,
669+ order : OrderModel | None = None ,
663670 ** kwargs : Any ,
664671 ) -> list [InfrahubNode ] | list [SchemaType ]:
665672 """Retrieve nodes of a given kind based on provided filters.
@@ -710,6 +717,7 @@ async def filters(
710717 prefetch_relationships = prefetch_relationships ,
711718 partial_match = partial_match ,
712719 property = property ,
720+ order = order ,
713721 )
714722 query = Query (query = query_data )
715723 response = await self .execute_graphql (
@@ -1564,6 +1572,7 @@ def all(
15641572 fragment : bool = ...,
15651573 prefetch_relationships : bool = ...,
15661574 property : bool = ...,
1575+ order : OrderModel | None = ...,
15671576 ) -> list [SchemaTypeSync ]: ...
15681577
15691578 @overload
@@ -1581,6 +1590,7 @@ def all(
15811590 fragment : bool = ...,
15821591 prefetch_relationships : bool = ...,
15831592 property : bool = ...,
1593+ order : OrderModel | None = ...,
15841594 ) -> list [InfrahubNodeSync ]: ...
15851595
15861596 def all (
@@ -1597,6 +1607,7 @@ def all(
15971607 fragment : bool = False ,
15981608 prefetch_relationships : bool = False ,
15991609 property : bool = False ,
1610+ order : OrderModel | None = None ,
16001611 ) -> list [InfrahubNodeSync ] | list [SchemaTypeSync ]:
16011612 """Retrieve all nodes of a given kind
16021613
@@ -1629,6 +1640,7 @@ def all(
16291640 fragment = fragment ,
16301641 prefetch_relationships = prefetch_relationships ,
16311642 property = property ,
1643+ order = order ,
16321644 )
16331645
16341646 def _process_nodes_and_relationships (
@@ -1682,6 +1694,7 @@ def filters(
16821694 prefetch_relationships : bool = ...,
16831695 partial_match : bool = ...,
16841696 property : bool = ...,
1697+ order : OrderModel | None = ...,
16851698 ** kwargs : Any ,
16861699 ) -> list [SchemaTypeSync ]: ...
16871700
@@ -1701,6 +1714,7 @@ def filters(
17011714 prefetch_relationships : bool = ...,
17021715 partial_match : bool = ...,
17031716 property : bool = ...,
1717+ order : OrderModel | None = ...,
17041718 ** kwargs : Any ,
17051719 ) -> list [InfrahubNodeSync ]: ...
17061720
@@ -1719,6 +1733,7 @@ def filters(
17191733 prefetch_relationships : bool = False ,
17201734 partial_match : bool = False ,
17211735 property : bool = False ,
1736+ order : OrderModel | None = None ,
17221737 ** kwargs : Any ,
17231738 ) -> list [InfrahubNodeSync ] | list [SchemaTypeSync ]:
17241739 """Retrieve nodes of a given kind based on provided filters.
@@ -1769,6 +1784,7 @@ def filters(
17691784 prefetch_relationships = prefetch_relationships ,
17701785 partial_match = partial_match ,
17711786 property = property ,
1787+ order = order ,
17721788 )
17731789 query = Query (query = query_data )
17741790 response = self .execute_graphql (
0 commit comments