Closed mdroidian closed 1 day ago
Query Builder condition: node {dgraph relation} {specific dgraph node} EG:
node
{dgraph relation}
{specific dgraph node}
results in con
con
{ "uid": "XOCN-tpwl", "source": "node", "target": "[[CLM]] - test mg clm", "relation": "Opposes", "type": "clause", "not": false }
The Discourse Datalog Translator checks to see if the value being passed is a
uid
is a
The value being passed is source, which is "node"
value
source
"node"
https://github.com/RoamJS/query-builder/blob/315dcc7f3dbc3fb2e23bd1045d56212b7223c2cb/src/utils/registerDiscourseDatalogTranslators.ts#L311-L316
so if the graph has [[node]], this is true:
[[node]]
https://github.com/RoamJS/query-builder/blob/315dcc7f3dbc3fb2e23bd1045d56212b7223c2cb/src/utils/registerDiscourseDatalogTranslators.ts#L290
which results in has title instead of is a
has title
also check for node here https://github.com/RoamJS/query-builder/blob/315dcc7f3dbc3fb2e23bd1045d56212b7223c2cb/src/utils/registerDiscourseDatalogTranslators.ts#L266
Problem
Query Builder condition:
node
{dgraph relation}
{specific dgraph node}
EG:results in
con
The Discourse Datalog Translator checks to see if the value being passed is a
uid
is a
https://github.com/RoamJS/query-builder/blob/315dcc7f3dbc3fb2e23bd1045d56212b7223c2cb/src/utils/registerDiscourseDatalogTranslators.ts#L257-L308The
value
being passed issource
, which is"node"
https://github.com/RoamJS/query-builder/blob/315dcc7f3dbc3fb2e23bd1045d56212b7223c2cb/src/utils/registerDiscourseDatalogTranslators.ts#L311-L316
so if the graph has
[[node]]
, this is true:https://github.com/RoamJS/query-builder/blob/315dcc7f3dbc3fb2e23bd1045d56212b7223c2cb/src/utils/registerDiscourseDatalogTranslators.ts#L290
which results in
has title
instead ofis a
Proposed Solution
also check for
node
here https://github.com/RoamJS/query-builder/blob/315dcc7f3dbc3fb2e23bd1045d56212b7223c2cb/src/utils/registerDiscourseDatalogTranslators.ts#L266