Apollo Server context function executed every 2 seconds

Is it normal that the context function of apollo-server-express is constantly executed in an interval?

const server = new ApolloServer({
  typeDefs,
  resolvers,
  context: ({ event, context, express }) => {
    console.log('context')
  }
})

I can see a new log output in the console every 2 seconds or so.

Cheers

Do you have playground open and running introspection against your graph at an interval? (it does this by default)

OMG, you are right @trevor.scheer

Yes, I use the Graphql Playground and as soon as I stopped it, the invocation of the context function stopped as well.

Thanks for the clarification.

1 Like