Go back to the server/src/apollo-server.ts file, remove the underscore before _db here
diffexport async function createApolloServer(- _db: Db,+ db: Db,httpServe
and insert the following code immediately before you create an instance of ApolloServer.
tsconst resolvers = {Query: {currentUser: () => {return {id: "123",name: "John Doe",handle: "johndoe",coverUrl: "",avatarUrl: "",createdAt: "",updatedAt: "",}},suggestions: () => {return []},},}
Pass this resolvers variable
diffconst server = new ApolloServer({typeDefs,+ resolvers,+ context: () => ({ db }),plugins: [ApolloServerPluginDrainHttpServer({ httpServer })],});
You should now be able to run the following query in the apollo dev tools.
graphqlquery CurrentUser {currentUser {name}}
and see a response like
jsonTry{"data": {"currentUser": {"name": "John Doe"}}}