MCPcopy Create free account
hub / github.com/apollographql/fullstack-tutorial / initialize

Method initialize

start/server/src/datasources/user.js:16–18  ·  view source on GitHub ↗

* This is a function that gets called by ApolloServer when being setup. * This function gets called with the datasource config including things * like caches and context. We'll assign this.context to the request context * here, so we can know about the user making requests

(config)

Source from the content-addressed store, hash-verified

14 * here, so we can know about the user making requests
15 */
16 initialize(config) {
17 this.context = config.context;
18 }
19
20 /**
21 * User can be called with an argument that includes email, but it doesn't

Callers 1

user.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected