apollo-tooling
apollo-tooling copied to clipboard
Configure the VSCode extension through codegen.yml
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:
// 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!