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

Eslint unsafe-assignment of function gql #9796

Closed
thomasender opened this issue Jun 8, 2022 · 3 comments
Closed

Eslint unsafe-assignment of function gql #9796

thomasender opened this issue Jun 8, 2022 · 3 comments

Comments

@thomasender
Copy link

Intended outcome:
Update of apollo client from 3.2.5 to 3.6.6 to resolve a bug where useQuery would deliver the correct data but then give the result of the same query again without the data.

Actual outcome:
After the update, the buggy behaviour, that lead to the decision to try an update, was resolved. Unfortunately, since updating to version 3.6.6, eslint is no longer happy with the function gql from @apollo/client and gives this warning:
Screenshot 2022-06-08 at 10 00 26

I could not find any posts of other devs having the same issue, so I figured it would be interesting to raise the issue here.

How to reproduce the issue:
Not sure if this will help to reproduce, but have apollo client 3.2.5 installed, then update to 3.6.6 using yarn upgrade

Versions
System:
OS: macOS 11.6.1
Binaries:
Node: 14.17.6 - ~/.asdf/installs/nodejs/14.17.6/bin/node
Yarn: 1.22.11 - ~/Desktop/Lovley/sc-fe/node_modules/.bin/yarn
npm: 8.3.2 - ~/.asdf/plugins/nodejs/shims/npm
Browsers:
Chrome: 102.0.5005.61
Firefox: 100.0
Safari: 14.1.2
npmPackages:
@apollo/client: 3.6.6 => 3.6.6
@apollo/react-ssr: 4.0.0 => 4.0.0
apollo-cache-inmemory: 1.6.6 => 1.6.6
apollo-link-persisted-queries: 0.2.2 => 0.2.2

@jpvajda jpvajda added 🐞 bug 🏓 awaiting-team-response requires input from the apollo team labels Jun 9, 2022
@jpvajda
Copy link
Contributor

jpvajda commented Jun 9, 2022

@thomasender Thanks for reporting this! We've done a decent amount of bug fixes around the useQuery hook so it's possible there is something not right here. It looks like release 3.6.6 contains only 1 PR #9762 based on our change log, so we can double check what might be going on here. cc @benjamn

@bignimbus
Copy link
Contributor

Hi @thomasender 👋🏻 I recommend taking a look at our TypeScript with Apollo Client docs. There are some great tools out there like GraphQL Code Generator that can help automate type safety. I'll close this issue for now but please feel free to reach out if you think there's a bug here!

@github-actions
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, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants