addNode

We learn about "rules and recommendations for the naming of node labels, relationship types, property names, variables, indexes, and constraints". page

> Names should not begin with a number. To illustrate, `1first` is not allowed, whereas `first1` is allowed.

Within the Paragraph Recommendation Viewer searchGraph context, we understand that paragraph IDs should not be used as types because paragraph IDs could begin with a number, which is not allowed in Cypher, and ask: Where do we create such nodes? See Speed Bot (speed-bot.html , addNode function)

function addNode(node, nodeProperties){ console.log("addNode reached"); // Add the node to the graph const newNodeId = graph.addNode(node, 0, 0, nodeProperties); console.log(`Node "${node}" (${newNodeId}) added`); serializeGraphAsJSONL(graph); return newNodeId; }

We call

addNode(type, props={}){ const obj = {type, in:[], out:[], props}; this.nodes.push(obj); return this.nodes.length-1; }

defined in Ward's graph.js. See Property Graphs as Javascript Module

But,

> Nodes have "labels", not "types" (the latter term only applies to relationships).

See "How do I check the type of a node in cypher?" stackoverflow

See also Cypher documentation: the "Node patterns" section of the "Cypher Cheat Sheet" page