-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Labels
area:diagnosticsFeedback for diagnostics, error messages, logs, etcFeedback for diagnostics, error messages, logs, etcarea:language serverAn umbrella label for all language serversAn umbrella label for all language serversarea:languagesAn umbrella label for all programming languages syntax behaviorsAn umbrella label for all programming languages syntax behaviorsarea:languages/typescriptTypeScript programming language supportTypeScript programming language supportbugDEPRECATED label: use issue type 'Bug' insteadDEPRECATED label: use issue type 'Bug' insteadstaleLabel used by `stale` actionLabel used by `stale` action
Description
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.
- Setup a simple react/ts project
- Setup graphQL Apollo client
- Setup graphQL codegen
- Write an INVALID query
- Create a query using apollo's
useQueryhook that queries your invalid query - Notice the inlay hint errors
- Correct the invalid query
- 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.
If applicable, attach your Zed.log file to this issue.
Zed.log
Metadata
Metadata
Assignees
Labels
area:diagnosticsFeedback for diagnostics, error messages, logs, etcFeedback for diagnostics, error messages, logs, etcarea:language serverAn umbrella label for all language serversAn umbrella label for all language serversarea:languagesAn umbrella label for all programming languages syntax behaviorsAn umbrella label for all programming languages syntax behaviorsarea:languages/typescriptTypeScript programming language supportTypeScript programming language supportbugDEPRECATED label: use issue type 'Bug' insteadDEPRECATED label: use issue type 'Bug' insteadstaleLabel used by `stale` actionLabel used by `stale` action