in src/NeptuneSchema.js [391:415]
async function loadSchemaViaSummary() {
try {
let graphSummary;
if (NEPTUNE_TYPE === NEPTUNE_DB) {
graphSummary = await getNeptuneDbSummary();
} else {
graphSummary = await getNeptuneGraphSummary();
}
graphSummary.nodeLabels.forEach(label => {
schema.nodeStructures.push({label:label, properties:[]});
loggerDebug('Found node: ' + yellow(label), {toConsole: true});
});
graphSummary.edgeLabels.forEach(label => {
schema.edgeStructures.push({label:label, properties:[], directions:[]});
loggerDebug('Found edge: ' + yellow(label), {toConsole: true});
});
return true;
} catch (error) {
loggerError('Getting the schema via Neptune Summary API failed', error);
return false;
}
}