apollographql / apollographql/apollo-client-integrations
Jest registerApolloClient is not a function
- Dominant language
- TypeScript
- Stars
- 556
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
I've followed the recommendations from the README, but I get this error during tests:
```bash
TypeError: (0 , _experimentalnextjsappsupport.registerApolloClient) is not a function
9 |
10 |
> 11 | const { getClient: graphClient } = registerApolloClient(() => {
```
Apart from jest the code works fine.
Repo to reproduce:
https://github.com/levchenkod/next-apolo-jest-basic-setup
Contributor guide
No contributing guide indexed for this repository
Research direction
Use the linked reproduction repository and README guidance first, then inspect the Jest setup around the registerApolloClient call shown in the report. Reproduce the TypeError; done means the Jest run can use registerApolloClient successfully while the existing non-test Next.js behavior remains working.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, typescript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100