Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better types MockedResponse.newData #11584

Closed
Stephen2 opened this issue Feb 9, 2024 · 3 comments · Fixed by #11592
Closed

Better types MockedResponse.newData #11584

Stephen2 opened this issue Feb 9, 2024 · 3 comments · Fixed by #11592

Comments

@Stephen2
Copy link
Contributor

Stephen2 commented Feb 9, 2024

Sorry for the blank issue & run, but I don't have time to make this a PR for next couple of weeks, but didn't want it to get forgotten:

https://github.com/apollographql/apollo-client/blob/65ab695470741e8dcaef1ebd7742c3c397526354/src/testing/core/mocking/mockLink.ts#L38C28-L38C39

should be: newData?: ResultFunction<FetchResult<TData>, TVariables>;

So the newData function is properly typed 🙏

@jerelmiller
Copy link
Member

Good catch! Feel free to submit a PR when you have time!

Copy link
Contributor

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.

Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants