Skip to content

Commit

Permalink
docs: undefined MyContext (#7637)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akash authored Oct 20, 2023
1 parent 8135ad9 commit 353bdd6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/source/workflow/generate-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ import { readFileSync } from 'fs';
// if the server is executed using `npm run`.
const typeDefs = readFileSync('./schema.graphql', { encoding: 'utf-8' });

interface MyContext {
dataSources: {
books: Book[];
};
}

const server = new ApolloServer<MyContext>({
typeDefs,
resolvers,
Expand Down

0 comments on commit 353bdd6

Please sign in to comment.