Summary
Create a falcor route to create a new book within a world.
See also #8, #9.
Authentication & Authorization
The current user must have write or owner permissions for the world in which the book is to be created.
Spec
Route (call): worldsById[id: string].books.push
Function Signature
function ( world_id : string, title : string ) : JSONGraphEnvelope
MongoDB
Create a new document for this world with the following parameters:
{
_id : string, // randomly generated
title: string,
created_at: Date.now(),
updated_at: Date.now(),
}
Neo4j
Merge (:Book)-[:IN]->(:World) with the following properties:
const Book = {
_id: bookId,
};
const World = {
_id: worldId,
};
const OF = {
archived: false,
created_at: Date.now(),
creator: userId, // user performing the operation
};
Return Paths
Return the path to the new ref in worldsById[key: string].books per #9.
Changelog
Summary
Create a falcor route to create a new book within a world.
See also #8, #9.
Authentication & Authorization
The current user must have write or owner permissions for the world in which the book is to be created.
Spec
Route (call):
worldsById[id: string].books.pushFunction Signature
MongoDB
Create a new document for this world with the following parameters:
Neo4j
Merge
(:Book)-[:IN]->(:World)with the following properties:Return Paths
Return the path to the new ref in
worldsById[key: string].booksper #9.Changelog
OFtoINandnametotitle.