0.0.253 • Published 3 months ago
quidproquo-neo4j v0.0.253
quidproquo-neo4j
- Go to https://neo4j.com/product/auradb/
- Select Start Free to set up a free database.
- Create an account (I used Sign in with Google).
- Agree to the Terms of Service and Privacy Policy.
- Choose an instance type; for development, I used AuraDB Free since it’s free.
- Save the credentials for
Instance01
(we will need this later). - Wait for
Instance01
to create (this could take a few minutes). - Add the database to your QPQ config, give it a name; I will call mine
graph
.
import { defineGraphDatabaseNeo4j } from 'quidproquo-neo4j';
export default [
// other config
defineGraphDatabaseNeo4j('graph', apiBuildPath)
];
- Deploy your service.
- Once the Neo4j database is created, under the name, you should see an instance ID. It will also be in the connection URI at the bottom, like this:
neo4j+s://XXXXXXXX.databases.neo4j.io
.
- Note that instance ID down, we will need it for our config.
- On your deployed site, update the parameter
neo4j-${databaseName}-instance
with the instance ID we just got. - Update the secret
neo4j-${databaseName}-password
with the password we downloaded earlier. - You should then be able to run queries using QPQ.
const responseA = yield* askGraphDatabaseExecuteOpenCypherQuery(
'graph',
GraphDatabaseInstanceType.Write,
`
CREATE (p:Person $personProps)
CREATE (b:Backpack $backpackProps)
CREATE (p)-[:OWNS]->(b)
RETURN p, b
`,
{
personProps: { id: '1234', name: 'Joe', age: 30 },
backpackProps: { brand: 'Fun', color: 'Red' },
}
);
const responseB = yield* askGraphDatabaseExecuteOpenCypherQuery(
'graph',
GraphDatabaseInstanceType.Read,
'MATCH (a) RETURN a LIMIT 10'
);
Notes
To set a version, you can pass it via the config
import { defineGraphDatabaseNeo4j, Neo4jVersion } from 'quidproquo-neo4j';
defineGraphDatabaseNeo4j('graph', apiBuildPath, Neo4jVersion.Version5)
0.0.238
7 months ago
0.0.237
8 months ago
0.0.236
8 months ago
0.0.239
6 months ago
0.0.252
3 months ago
0.0.251
4 months ago
0.0.250
4 months ago
0.0.253
3 months ago
0.0.249
4 months ago
0.0.248
4 months ago
0.0.247
4 months ago
0.0.246
4 months ago
0.0.241
5 months ago
0.0.240
5 months ago
0.0.245
4 months ago
0.0.244
5 months ago
0.0.243
5 months ago
0.0.242
5 months ago
0.0.235
8 months ago
0.0.234
8 months ago
0.0.233
8 months ago
0.0.232
8 months ago
0.0.231
9 months ago
0.0.230
9 months ago