Hello GraphQL!

This commit is contained in:
Zalmoxisus
2016-11-12 16:21:41 +02:00
parent 1ba4d1e40b
commit 386d9abfaf
7 changed files with 123 additions and 0 deletions

13
lib/middleware/graphql.js Normal file
View File

@ -0,0 +1,13 @@
var apolloExpress = require('apollo-server').apolloExpress;
var schema = require('../api/schema');
module.exports = function (store) {
return apolloExpress(function() {
return {
schema: schema,
context: {
store: store
}
};
});
};