error TS2769: No overload matches this call, nothing works

error TS2769: No overload matches this call, nothing works


-1

im facing some issues with my code. Currently im doing the Catstronaut, from the (Lift-Off II) GraphQL with Apollo Tutorial. But after i wanna restart my services (dev and server) im recieving those errors:

It shows some Overloads 1 of 2
below you can find the whole Error message and a code snippet from this ts file.

However, the error must be in the function startApolloServer().

error TS2769: No overload matches this call.

async function startApolloServer() {
  const server = new ApolloServer({ typeDefs, resolvers });
  const { url } = await startStandaloneServer(server, {
    context: async () => {
      const { cache } = server;
      return {
        dataSources: {
          trackAPI: new TrackAPI({ cache }),
        },
      };
    },
  });

Here is the Error Message:

error TS2769: No overload matches this call, nothing works

1

  • Based on the error message it looks like it's just a typo: you made the key in the return object "dataSources" but the type of that has "dataSource" with no "s" on the end. I know overload compiler errors are pretty dense but the last line is usually the relevant one.

    – Jared Smith

    7 mins ago



Load 4 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *