Missing server config for apollo-express graphql server

It’s amazing (in a bad way) how much time I spent on getting new apollo-express working. Here is missing code (quite small!):

// based on http://dev.apollodata.com/tools/apollo-server/migration.html
const fs = require('fs'),
    bodyParser = require('body-parser'),
    apolloExpress = require('apollo-server').apolloExpress,
    graphiqlExpress = require('apollo-server').graphiqlExpress,
    makeExecutableSchema = require('graphql-tools').makeExecutableSchema,
    schema = fs.readFileSync(__dirname + '/schema.graphqls', 'utf8'),
    resolvers = require('./resolvers'),
    executableSchema = makeExecutableSchema({
        typeDefs: schema,
        resolvers
    });

module.exports = function(app) {
    app.use('/graphql', bodyParser.json(), apolloExpress({
        schema: executableSchema
    }));

    app.use('/graphiql', graphiqlExpress({
        endpointURL: '/graphql',
    }));
};