apollographql / apollographql/apollo-tooling
vscode intellisense not working
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
**Intended outcome:**
I have a project with the following apollo config in root of project:
```js
// Used for vscode intellisense
module.exports = {
client: {
service: {
name: 'dev',
localSchemaFile: './prototype/graphql.schema.json'
}
}
};
```
I am using graphql-code-generator to generate an introspection json file at `./prototype/graphql.schema.json`
When writing a query document in `./prototype/src/queries/mutations.ts` I have the following:
```ts
import {gql} from '@apollo/client'
export const putTrack = gql`
mutation PutProgress($trackId: String!, $currentlyAt: Int!) {
putProgress(trackId: $trackId, currentlyAt: $currentlyAt) {
userId
}
}
`;
```
I should get autocomplete options when typing the fields described in the introspection schema linked from the apollo.config.js
**Actual outcome:**
I get no autocomplete
**How to reproduce the issue:**
Use localSchemaFile pointing to an introspection schema and try to use autocomplete/intellisense
**Versions**
vscode "Apollo GraphQL" 1.16.6
Contributor guide
Research direction
Reproduce the missing autocomplete using apollo.config.js with localSchemaFile set to ./prototype/graphql.schema.json, then query fields in ./prototype/src/queries/mutations.ts through the Apollo GraphQL VS Code extension. Confirm that the extension loads the introspection schema and that autocomplete appears for fields described by it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100