Created
April 24, 2021 01:38
-
-
Save efueyo/d9096950c0bcff8670aa0f4b87cf152b to your computer and use it in GitHub Desktop.
Apollo-Sentry-Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ApolloServer } from "apollo-server-micro" | |
import { createContext } from "./context" | |
import SentryPlugin from "./sentry-plugin" | |
const apolloServer = new ApolloServer({ | |
// ... your ApolloServer options | |
// Create context function | |
context: ({ req, connection }) => createContext({ req, connection }), | |
// Add our sentry plugin | |
plugins: [SentryPlugin], | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment