Overview
Migrate falcor routes pertaining to a user's worlds to get the database relationships using Neo4j.
Specs
The details of worlds still come from MongoDB. It is only their association to users (and other entities, in other GH issues) that is stored in Neo4j. The _id property in neo will be the same as the _id property in MongoDB.
User Worlds Length
The current length of user's worlds comes from the length of the array in the mongo document. Instead, this should come from the set of non-archived (see #12 and #11) ROLE relationships from this user to a world, ordered by their creation date.
User Worlds By Index
The current means of fetching individual worlds in relation to a user is by their index position in the array. This array should become the ordered set of worlds that follow the above logic.
Push New World Relationship
Worlds are created by pushing to the array in mongo. Instead, the world document will still be created in mongo, but the relationship between users and worlds will be tracked in neo with no mongo equivalent.
(:User)-[:ROLE {RoleProps}]->(:World)
With the following properties:
type RoleProps = {
created_at: timestamp,
creator: string, // id of currently-authenticated user
};
// In MongoDB
type WorldProps = {
_id: string,
title: string,
};
Overview
Migrate falcor routes pertaining to a user's worlds to get the database relationships using Neo4j.
Specs
The details of worlds still come from MongoDB. It is only their association to users (and other entities, in other GH issues) that is stored in Neo4j. The
_idproperty in neo will be the same as the_idproperty in MongoDB.User Worlds Length
The current length of user's worlds comes from the length of the array in the mongo document. Instead, this should come from the set of non-archived (see #12 and #11)
ROLErelationships from this user to a world, ordered by their creation date.User Worlds By Index
The current means of fetching individual worlds in relation to a user is by their index position in the array. This array should become the ordered set of worlds that follow the above logic.
Push New World Relationship
Worlds are created by pushing to the array in mongo. Instead, the world document will still be created in mongo, but the relationship between users and worlds will be tracked in neo with no mongo equivalent.
With the following properties: