apollographql / apollographql/apollo-tooling
excludes has wrong path resolution
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
given an apollo.config.js with the following content, it lives in the project-root:
```
module.exports = {
client: {
service: {
name: "veloplus-api",
url: "http://localhost:4000"
},
excludes: ["./src/modules/admin/**/*"]
}
};
````
**Intended outcome:**
any file withing ./src/modules/admin (relative to the project root) is ignored by the vscode extension
**Actual outcome:**
excludes does nothing, it still tries to apply the config to the files in ./src/modules/admin
workaround:
use ` excludes: ["**/src/modules/admin/**/*"]`
it seems the path resolution does not resolve the path properly relative to the root. I think developers would expect it to resolve relative to the apollo.config.js file.
**How to reproduce the issue:**
having a project with two folders, one of which should be ignored.
configure apollo.config to ignore one folder
Define a query in each of the folders.
**Versions**
extension version 1.18.0
Contributor guide
Research direction
Start with the VS Code extension's handling of `client.excludes` from the project-root `apollo.config.js`, and trace how the `./src/modules/admin/**/*` pattern is resolved. Compare that behavior with the working `**/src/modules/admin/**/*` workaround, then add coverage showing that files under the excluded folder are ignored while other folders remain processed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100