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

Inlay hints for Typescript errors do not update after issue is fixed #21943

Open
1 task done
AustinCase opened this issue Dec 12, 2024 · 0 comments
Open
1 task done
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue

Comments

@AustinCase
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

This happens in many scenarios but there has not been a pattern that sticks out. It can be inconsistent and hard to reproduce.

The scenario that is reproducible is slightly difficult but does reproduce:
You'll need a backend graphql API with introspection available in order to set this up properly.

  1. Setup a simple react/ts project
  2. Setup graphQL Apollo client
  3. Setup graphQL codegen
  4. Write an INVALID query
  5. Create a query using apollo's useQuery hook that queries your invalid query
  6. Notice the inlay hint errors
  7. Correct the invalid query
  8. Notice that the inlay error still exists but the types are all generated and valid

Fundamental code example:

import { useQuery } from '@apollo/client';
import { graphql } from '@/graphql';

export const App = () => {
  const { data, loading, errors } = useQuery(GENERIC_QUERY);

  return <div>{data.querySomething.id}</div>
}

const GENERIC_QUERY = graphql(`
  query GenericQuery {
     querySomething {
       id
     }
  }
`);

Environment

Zed: v0.165.4 (Zed)
OS: macOS 14.5.0
Memory: 16 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

Notice the error of destructuring any value, but clearly it knows the type in the other overlay.

image

If applicable, attach your Zed.log file to this issue.

Zed.log

@AustinCase AustinCase added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue
Projects
None yet
Development

No branches or pull requests

1 participant