mirror of
https://github.com/Ratstail91/sineQL.git
synced 2025-11-29 02:34:28 +11:00
Layed out a fake database
This commit is contained in:
30
server/handler.js
Normal file
30
server/handler.js
Normal file
@@ -0,0 +1,30 @@
|
||||
const database = require('./database.js');
|
||||
|
||||
console.log(database);
|
||||
|
||||
//the handler routines
|
||||
const handler = {
|
||||
Book: scalars => {
|
||||
//takes an array of scalar types as objects: { typeName: 'String', name: 'title' }
|
||||
//must return an array of objects containing the results
|
||||
},
|
||||
|
||||
Author: scalars => {
|
||||
//takes an array of scalar types as objects: { typeName: 'String', name: 'name' }
|
||||
//must return an array of objects containing the results
|
||||
},
|
||||
|
||||
create: (sets, matches) => {
|
||||
//TODO
|
||||
},
|
||||
|
||||
update: (sets, matches) => {
|
||||
//TODO
|
||||
},
|
||||
|
||||
delete: matches => {
|
||||
//TODO
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = handler;
|
||||
Reference in New Issue
Block a user