query {
comp(func: eq(dgraph.type,"ServiceTemplate")) {
topologytemplate{
nodetemplates {
name
namespace @filter (eq(url,"a_url")){
url
}
}
}
}
}
Using the above query I am want to filter data that nodetemplate objects have matching URL that we are passing in query and we get a list of all nodetemplates but I am getting result as follows:
{
"data": {
"comp": [
{
"topologytemplate": {
"nodetemplates": [
{
"name": "a",
"namespace": {
"url": "a_url"
}
},
{
"name": "b"
},
{
"name": "c"
},
{
"name": "d"
},
{
"name": "e"
},
{
"name": "f",
"namespace": {
"url": "b_url"
}
},
{
"name": "g"
}
]
}
}
]
},
}
But I want only those nodetemplates that have URLs that we are going to filter using graphQL. Any idea how to filter it.
This is DQL, not GraphQL.
You could use the directive "@cascade"