graphql / graphql/graphiql

default to client watcher pattern ala LSP

Open
#1,146 4 comments 0 reactions 0 assignees View on GitHub
lsp-server
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

We have a nice custom watcher built into our server using `fb-watchman`, however vscode and other LSP oriented IDE clients would expect to be able to provide their own, and for this server to respond to workspace watch/file change notifications sent from the IDE client.

Thus, we need to decouple this watcher from the server such that it doesn't bring many additional dependencies, and the `fb-watchman` dependency itself would become an `optionalDependencies` entry that we can suggest to the user if they are working with an IDE that expects a server watcher, and they aren't using an LSP client compatibility layer with a built-in watcher for their IDE (which is probably common). Using a server side watcher is possible, but is against the reccomendation of [the microsoft LSP docs](https://microsoft.github.io/language-server-protocol/specifications/specification-3-14/#workspace_didChangeWatchedFiles).

We could also ship it as an additional wrapper package, of the server bundled with fb-watchman. no harm in adding more packages to the monorepo. It could also move to a contrib space

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.