mirror of
https://github.com/wassname/talk.git
synced 2026-06-28 21:13:12 +08:00
17 lines
443 B
JavaScript
17 lines
443 B
JavaScript
const schema = require('./schema');
|
|
const Context = require('./context');
|
|
const {createSubscriptionManager} = require('./subscriptions');
|
|
|
|
module.exports = {
|
|
createGraphOptions: (req) => ({
|
|
|
|
// Schema is created already, so just include it.
|
|
schema,
|
|
|
|
// Load in the new context here, this'll create the loaders + mutators for
|
|
// the lifespan of this request.
|
|
context: new Context(req)
|
|
}),
|
|
createSubscriptionManager
|
|
};
|