Look at https://www.apollographql.com/docs/apollo-server/testing/mocking/ for how to mock with Apollo Server.