Skip to content

Commit 1b26e02

Browse files
authored
Change relative path to include nested dataconnect folders (#8853)
* change relative path to include nested dataconnect folders * changelog * update deprecated call
1 parent bbfd570 commit 1b26e02

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

firebase-vscode/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## NEXT
22

3+
- [Fixed] Language server now properly recognizes nested Dataconnect folders
4+
35
## 1.5.0
46

57
- Update internal `firebase-tools` dependency to 14.9.0

firebase-vscode/src/data-connect/config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,10 @@ export class ResolvedDataConnectConfig {
268268
}
269269

270270
get relativePath(): string {
271-
return this.path.split("/").pop()!;
271+
if (!getConfigPath()) {
272+
return this.path.split("/").pop()!;
273+
}
274+
return path.relative(getConfigPath()!, this.path);
272275
}
273276

274277
get relativeSchemaPath(): string {

firebase-vscode/src/data-connect/language-client.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,5 @@ export function setupLanguageClient(
141141
outputChannel.appendLine("Firebase GraphQL Language Server restarted");
142142
});
143143

144-
// ** DISABLED FOR NOW WHILE WE TEST GENERATED YAML **
145-
// restart server whenever config file changes
146-
// const watcher = vscode.workspace.createFileSystemWatcher(
147-
// "**/.graphqlrc.*", // TODO: extend to schema files, and other config types
148-
// false,
149-
// false,
150-
// false,
151-
// );
152-
// watcher.onDidChange(() => restartGraphqlLSP());
153-
154144
return client;
155145
}

0 commit comments

Comments
 (0)