File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
connector-definition/template Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ This changelog documents the changes between release versions.
4
4
## [ Unreleased]
5
5
Changes to be included in the next upcoming release
6
6
7
+ ## [ 0.0.36] - 2024-08-07
8
+ * Add support for query variables
9
+ * Add support for parallel query execution
10
+
7
11
## [ 0.0.35] - 2024-08-05
8
12
* Update SDK to listen on IPV4 & IPV6
9
13
Original file line number Diff line number Diff line change 12
12
from opentelemetry .trace import get_tracer # If you aren't planning on adding additional tracing spans, you don't need this either!
13
13
from hasura_ndc .function_connector import FunctionConnector
14
14
from pydantic import BaseModel # You only need this import if you plan to have complex inputs/outputs, which function similar to how frameworks like FastAPI do
15
+ import asyncio # You might not need this import if you aren't doing asynchronous work
15
16
16
17
connector = FunctionConnector ()
17
18
@@ -92,6 +93,11 @@ async def do_some_async_work(_span):
92
93
{"tracing-attr" : "Additional attributes can be added to Otel spans by making use of with_active_span like this" }
93
94
)
94
95
96
+ # This is an example of how to setup queries to be run in parallel
97
+ @connector .register_query (parallel_degree = 5 ) # When joining to this function, it will be executed in parallel in batches of 5
98
+ async def parallel_query (name : str ) -> str :
99
+ await asyncio .sleep (1 )
100
+ return f"Hello { name } "
95
101
96
102
if __name__ == "__main__" :
97
103
start (connector )
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ fastapi==0.110.2
9
9
googleapis-common-protos == 1.63.0
10
10
grpcio == 1.62.2
11
11
h11 == 0.14.0
12
- hasura-ndc == 0.21
12
+ hasura-ndc == 0.22
13
13
idna == 3.7
14
14
importlib-metadata == 7.0.0
15
15
opentelemetry-api == 1.24.0
You can’t perform that action at this time.
0 commit comments