@@ -288,8 +288,8 @@ export default class InferredQueryHandler {
288
288
newResponse . message . results . forEach ( ( result ) => {
289
289
const translatedResult : TrapiResult = {
290
290
node_bindings : {
291
- [ qEdge . subject ] : [ { id : result . node_bindings . creativeQuerySubject [ 0 ] . id } ] ,
292
- [ qEdge . object ] : [ { id : result . node_bindings . creativeQueryObject [ 0 ] . id } ] ,
291
+ [ qEdge . subject ] : [ { id : result . node_bindings . creativeQuerySubject [ 0 ] . id , attributes : [ ] } ] ,
292
+ [ qEdge . object ] : [ { id : result . node_bindings . creativeQueryObject [ 0 ] . id , attributes : [ ] } ] ,
293
293
} ,
294
294
pfocr : result . pfocr ?. length ? result . pfocr : undefined ,
295
295
analyses : [
@@ -311,14 +311,14 @@ export default class InferredQueryHandler {
311
311
// Direct edge answers stand on their own, not as an inferred edge.
312
312
if ( Object . keys ( result . node_bindings ) . length == 2 ) {
313
313
const boundEdgeID = Object . values ( result . analyses [ 0 ] . edge_bindings ) [ 0 ] [ 0 ] . id ;
314
- translatedResult . analyses [ 0 ] . edge_bindings = { [ qEdgeID ] : [ { id : boundEdgeID } ] } ;
314
+ translatedResult . analyses [ 0 ] . edge_bindings = { [ qEdgeID ] : [ { id : boundEdgeID , attributes : [ ] } ] } ;
315
315
} else {
316
316
// Create an aux graph using the result and associate it with an inferred Edge
317
317
const inferredEdgeID = `inferred-${ resultCreativeSubjectID } -${ qEdge . predicates [ 0 ] . replace (
318
318
'biolink:' ,
319
319
'' ,
320
320
) } -${ resultCreativeObjectID } `;
321
- translatedResult . analyses [ 0 ] . edge_bindings = { [ qEdgeID ] : [ { id : inferredEdgeID } ] } ;
321
+ translatedResult . analyses [ 0 ] . edge_bindings = { [ qEdgeID ] : [ { id : inferredEdgeID , attributes : [ ] } ] } ;
322
322
if ( ! combinedResponse . message . knowledge_graph . edges [ inferredEdgeID ] ) {
323
323
combinedResponse . message . knowledge_graph . edges [ inferredEdgeID ] = {
324
324
subject : resultCreativeSubjectID ,
@@ -357,6 +357,7 @@ export default class InferredQueryHandler {
357
357
} ,
358
358
[ ] as string [ ] ,
359
359
) ,
360
+ attributes : [ ]
360
361
} ;
361
362
}
362
363
0 commit comments