I want to create a Typescript project that is a example of how to test a GraphQL server and verify that the server supports the Relay-Connections specification here: https://relay.dev/graphql/connections.htm
The project should meet these requirements:
- Contains a Jest test file as follows:
- Before running test, Apollo Server before running the tests:
- The server should be started as shown here: https://github.com/snoopdave/blogql/blob/main/server/src/integration.test.ts#L48
- The server should provide:
- A GraphQL schema that defines a
User
type with id, name, email address properties. The GraphQL schema should be read from a separate file calledschema.graphql
- A GraphQL query called
getUsers
that returns a collection of users with Relay-Connection paging, by default this query returns a maximum of 10 users at a time. Both forward and backward paging should be supported
- A GraphQL schema that defines a
- Before running test, Apollo Server before running the tests:
- When the server starts, it should create a collection of 100 random users in-memory using Faker and these use