Set up playwright tests: server.tsx imports a server side file
Hello, I am trying to set up Playwright tests in a TanStack Start application. I am using Apollo GraphQL server and client for fetching data, so I am preloading the Apollo Server in the server.tsx file:
The function needs to read the GraphQL schema file, I am doing this:
The issue starts as soon as the
start
command is executed:
Shall I patch the server.tsx import in a cumbersome way? Is there a better option?1 Reply
fair-roseOP•3mo ago
Solved by moving the schema contents from the.graphql file to a typescript file and importing the schema as a string 😅 I don't know whether this is the best solution, but it works ...