-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Add graphql forward function to support forward GraphQL query as is or with transform to original names to a separate service (http source) or by endpoint.
The main goal - run graphql on the separate GraphQL service.
For begin - implement forwarding GraphQL query to the cluster management node and return results from each node, something like this:
original query:
query($var1: Type1!, $var2:Type2){
core{
cluster{
query_nodes{
node
query{
devices(filter:$var1){
id
name
description
geom
events(filter:{
event_time: {
gt: "2025-04-01T17:25"
lte: "2025-04-01T17:25"
}
type: {
eq: $var2
}
})
}
}
}
}
}
}forwarded query:
query($var1:OriginalType!, $var2: String){
query_nodes{
node
query{
devices_original_name(filter:$var1){
id
name
description
geom
events(filter:{
event_time: {
gt: "2025-04-01T17:25"
lte: "2025-04-01T17:25"
}
type: {
eq: $var2
}
})
}
}
}
}This can be implemented as special SQL UDF - forward_graphql and should be defined a special query type (the same way as function or select), and special plan node, that serialises selection set as query and variables to JSON, and perform http call.
Reactions are currently unavailable