-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
kind/bugSomething is broken.Something is broken.
Description
prerequisites:
entity_key: string @index(exact) .
link_key: string @index(exact) .
link_agg_key: string @index(exact) .
r2mlink: uid @reverse .
m2mlink: uid @reverse .
w2mlink: uid @reverse .
i2wlink: uid @reverse .
r2mlink_agg: uid @reverse .
m2mlink_agg: uid @reverse .
attr_label: string @index(trigram) .
attr_description: string @index(trigram) .
dummy: string .
{
set {
_:entity <entity_key> "c8498990-fe19-11e8-bbf2-9bd27031db92" .
_:entity <type_Instance> "" .
_:entity <rel_0aa70b26-6c16-4337-96c9-730b78e8264f> "" .
_:lnk <link_agg_key> "c8498990-fe19-11e8-bbf2-9bd27031db92|c8498990-fe19-11e8-bbf2-9bd27031db00" .
_:entity <r2mlink_agg> _:lnk .
_:lnk <r2mlink_agg> _:concept .
_:concept <entity_key> "c8498990-fe19-11e8-bbf2-9bd27031db00" .
_:concept <type_Concept> "" .
}
}
query:
{
initial_uid as var(func: eq(entity_key, ["c8498990-fe19-11e8-bbf2-9bd27031db92"])) @filter(has(type_Instance) and not(has(dummy)) and (has(rel_0aa70b26-6c16-4337-96c9-730b78e8264f)))
resources_uid as var (func: uid(initial_uid)) @filter()
var(func: uid(resources_uid)) {
links_uid as r2mlink
}
var(func: uid(resources_uid)) {
r2mlink_agg {
metadata_Concept as r2mlink_agg @filter(has(type_Concept) and not(has(dummy)))
}
}
var(func: uid(metadata_Concept)) @cascade {
m2mlink_agg {
cnt_m_Concept as math(1)
m2mlink_agg {
~r2mlink_agg {
~r2mlink_agg @filter(has(rel_0aa70b26-6c16-4337-96c9-730b78e8264f))
}
}
}
metadata_count_Concept as sum(val(cnt_m_Concept))
}
Concept(func: uid(metadata_Concept), offset : 0, first: 13) {
entityKey: entity_key
attrLabel: attr_label
attrDescription: attr_description
entityType: entity_type
labels: ~r2mlink @filter(uid(links_uid)) {
label
}
metadataLinksCount: val(metadata_count_Concept)
}
}
result:
{
"errors": [
{
"code": "ErrorInvalidRequest",
"message": "Wrong use of var() with [{metadata_count_Concept 2}]."
}
],
"data": null
}
on 1.0.10 it worked fine. please, add unit tests/regression or something else not to break existing functionality
Metadata
Metadata
Assignees
Labels
kind/bugSomething is broken.Something is broken.