apollographql / apollographql/apollo-tooling
VSCode extension shouldn't fail on scanning directories
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
### Intended outcome:
Apollo VSCode extension doesn't scan directories **excluded in `apollo.config.js`** and loads without an error.
### Actual outcome:
```
[Trace - 11:38:38 AM] Sending request 'initialize - (0)'.
[Trace - 11:38:39 AM] Received response 'initialize - (0)' in 489ms. Request failed: Request initialize failed with message: EACCES: permission denied, scandir '/srv/momentum/data/postgres' (-32603).
[Error - 11:38:39 AM] Server initialization failed.
Message: Request initialize failed with message: EACCES: permission denied, scandir '/srv/momentum/data/postgres'
Code: -32603
```

### How to reproduce the issue:
In root directory of a project create a file or directory owned by different user (`root` for example).
Add it to `client.excludes` and make sure that `client.includes` and `service.localSchemaFile` doesn't use it.
### Versions
`v1.18.9`
## Related to:
https://github.com/apollographql/apollo-tooling/issues/1715
Contributor guide
Research direction
Start with the VSCode extension's initialization and directory-scanning entry point, then inspect how apollo.config.js values for client.excludes, client.includes, and service.localSchemaFile are applied. Reproduce the failure with an unreadable excluded directory. Done means excluded directories are not scanned and the extension initializes without an EACCES error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100