Skip to content

Commit

Permalink
Report project name in warning when no files are found.
Browse files Browse the repository at this point in the history
Allows to better pinpoint offending project when working with multiple projects.
  • Loading branch information
Cellule committed Dec 31, 2024
1 parent e05aec8 commit 4e60d08
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/flat-news-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vscode-apollo": patch
---

Report project name in warning when no files are found. Allows to better pinpoint offending project when working with multiple projects.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"editor.wordWrapColumn": 110,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"[typescript]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "never"
}
},
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
Expand Down
2 changes: 1 addition & 1 deletion src/language-server/project/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export class GraphQLClientProject extends GraphQLInternalProject {

if (this.allIncludedFiles().length === 0) {
console.warn(
"⚠️ It looks like there are 0 files associated with this Apollo Project. " +
`⚠️ It looks like there are 0 files associated with Apollo Project: "${this.displayName}". ` +
"This may be because you don't have any files yet, or your includes/excludes " +
"fields are configured incorrectly, and Apollo can't find your files. " +
"For help configuring Apollo projects, see this guide: https://go.apollo.dev/t/config",
Expand Down

0 comments on commit 4e60d08

Please sign in to comment.