apollographql / apollographql/apollo-tooling
Configure the VSCode extension through codegen.yml
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
Im working on a repository, where there are duplicate definitions (though the GraphQL Playground does not have any issues), therefore, using the `includes` and `excludes` in the `apollo.config.js` is hardly possible, or easy.
I was wondering, if it was possible to simply include the `codegen.yml` instead. So, I gave it a try and it seems like the extension finds the types:
```js
// apollo.config.js
module.exports = {
client: {
includes: ['codegen.yml'],
service: {
name: 'my-project',
url: 'http://localhost:3000/graphql',
},
},
}
```
```
// Output
------------------------------
🚀 Apollo GraphQL v1.19.4
------------------------------
✅ Service Loaded!
🆔 Service ID: my-project
🏷 Schema Tag: current
📈 Number of Types: 64 (0 client types)
------------------------------
```
For some reason though, validation and autocomplete do not work.
Am I doing something wrong here? Is it possible even to use the `codegen.yml` like that?
Thanks!
Contributor guide
Research direction
Start with the apollo.config.js example and codegen.yml behavior described in the issue, then trace how the VSCode extension loads included files. Determine whether codegen.yml is supported for validation and autocomplete, and make the behavior consistent with the documented configuration or clearly report the limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript, vscode, yaml
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100