@@ -94,7 +94,9 @@ class ProcessRelationsNodeSync(TypedDict):
9494 related_nodes : list [InfrahubNodeSync ]
9595
9696
97- def handle_relogin (func : Callable [..., Coroutine [Any , Any , httpx .Response ]]): # type: ignore[no-untyped-def]
97+ def handle_relogin (
98+ func : Callable [..., Coroutine [Any , Any , httpx .Response ]],
99+ ) -> Callable [..., Coroutine [Any , Any , httpx .Response ]]:
98100 @wraps (func )
99101 async def wrapper (client : InfrahubClient , * args : Any , ** kwargs : Any ) -> httpx .Response :
100102 response = await func (client , * args , ** kwargs )
@@ -108,7 +110,7 @@ async def wrapper(client: InfrahubClient, *args: Any, **kwargs: Any) -> httpx.Re
108110 return wrapper
109111
110112
111- def handle_relogin_sync (func : Callable [..., httpx .Response ]): # type: ignore[no-untyped-def]
113+ def handle_relogin_sync (func : Callable [..., httpx .Response ]) -> Callable [..., httpx . Response ]:
112114 @wraps (func )
113115 def wrapper (client : InfrahubClientSync , * args : Any , ** kwargs : Any ) -> httpx .Response :
114116 response = func (client , * args , ** kwargs )
@@ -170,6 +172,7 @@ def __init__(
170172 self .group_context : InfrahubGroupContext | InfrahubGroupContextSync
171173 self ._initialize ()
172174 self ._request_context : RequestContext | None = None
175+ _ = self .config .tls_context # Early load of the TLS context to catch errors
173176
174177 def _initialize (self ) -> None :
175178 """Sets the properties for each version of the client"""
@@ -590,7 +593,7 @@ async def _process_nodes_and_relationships(
590593 schema_kind (str): The kind of schema being queried.
591594 branch (str): The branch name.
592595 prefetch_relationships (bool): Flag to indicate whether to prefetch relationship data.
593- timeout (int, optional): Overrides default timeout used when querying the graphql API. Specified in seconds.
596+ timeout (int, optional): Overrides default timeout used when querying the GraphQL API. Specified in seconds.
594597
595598 Returns:
596599 ProcessRelationsNodeSync: A TypedDict containing two lists:
@@ -710,7 +713,7 @@ async def all(
710713 at (Timestamp, optional): Time of the query. Defaults to Now.
711714 branch (str, optional): Name of the branch to query from. Defaults to default_branch.
712715 populate_store (bool, optional): Flag to indicate whether to populate the store with the retrieved nodes.
713- timeout (int, optional): Overrides default timeout used when querying the graphql API. Specified in seconds.
716+ timeout (int, optional): Overrides default timeout used when querying the GraphQL API. Specified in seconds.
714717 offset (int, optional): The offset for pagination.
715718 limit (int, optional): The limit for pagination.
716719 include (list[str], optional): List of attributes or relationships to include in the query.
@@ -807,7 +810,7 @@ async def filters(
807810 kind (str): kind of the nodes to query
808811 at (Timestamp, optional): Time of the query. Defaults to Now.
809812 branch (str, optional): Name of the branch to query from. Defaults to default_branch.
810- timeout (int, optional): Overrides default timeout used when querying the graphql API. Specified in seconds.
813+ timeout (int, optional): Overrides default timeout used when querying the GraphQL API. Specified in seconds.
811814 populate_store (bool, optional): Flag to indicate whether to populate the store with the retrieved nodes.
812815 offset (int, optional): The offset for pagination.
813816 limit (int, optional): The limit for pagination.
@@ -1089,7 +1092,7 @@ async def _default_request_method(
10891092
10901093 async with httpx .AsyncClient (
10911094 ** proxy_config ,
1092- verify = self .config .tls_ca_file if self . config . tls_ca_file else not self . config . tls_insecure ,
1095+ verify = self .config .tls_context ,
10931096 ) as client :
10941097 try :
10951098 response = await client .request (
@@ -1961,7 +1964,7 @@ def all(
19611964 kind (str): kind of the nodes to query
19621965 at (Timestamp, optional): Time of the query. Defaults to Now.
19631966 branch (str, optional): Name of the branch to query from. Defaults to default_branch.
1964- timeout (int, optional): Overrides default timeout used when querying the graphql API. Specified in seconds.
1967+ timeout (int, optional): Overrides default timeout used when querying the GraphQL API. Specified in seconds.
19651968 populate_store (bool, optional): Flag to indicate whether to populate the store with the retrieved nodes.
19661969 offset (int, optional): The offset for pagination.
19671970 limit (int, optional): The limit for pagination.
@@ -2008,7 +2011,7 @@ def _process_nodes_and_relationships(
20082011 schema_kind (str): The kind of schema being queried.
20092012 branch (str): The branch name.
20102013 prefetch_relationships (bool): Flag to indicate whether to prefetch relationship data.
2011- timeout (int, optional): Overrides default timeout used when querying the graphql API. Specified in seconds.
2014+ timeout (int, optional): Overrides default timeout used when querying the GraphQL API. Specified in seconds.
20122015
20132016 Returns:
20142017 ProcessRelationsNodeSync: A TypedDict containing two lists:
@@ -2100,7 +2103,7 @@ def filters(
21002103 kind (str): kind of the nodes to query
21012104 at (Timestamp, optional): Time of the query. Defaults to Now.
21022105 branch (str, optional): Name of the branch to query from. Defaults to default_branch.
2103- timeout (int, optional): Overrides default timeout used when querying the graphql API. Specified in seconds.
2106+ timeout (int, optional): Overrides default timeout used when querying the GraphQL API. Specified in seconds.
21042107 populate_store (bool, optional): Flag to indicate whether to populate the store with the retrieved nodes.
21052108 offset (int, optional): The offset for pagination.
21062109 limit (int, optional): The limit for pagination.
@@ -2929,7 +2932,7 @@ def _default_request_method(
29292932
29302933 with httpx .Client (
29312934 ** proxy_config ,
2932- verify = self .config .tls_ca_file if self . config . tls_ca_file else not self . config . tls_insecure ,
2935+ verify = self .config .tls_context ,
29332936 ) as client :
29342937 try :
29352938 response = client .request (
0 commit comments