[schema first] Language server won't auto reload after the schema SDL file updated
Actual Behavior
Updating the schema SDL file won't trigger language server reload. As the result, auto-completion kind of function doesn't work for the documents kind of graphql file. After manually reload the language server, everything works fine.
Expected Behavior
Language server should reload automatically, once the schema.graphql file is updated.
Steps to Reproduce the Problem Or Description
Specifications
- GraphQL for VSCode Extension Version: 0.3.33
- VSCode Version: 1.62.3
- OS Name: Windows 11
- OS Version: 10.0.22000
- graphql config filename and format example: .graphqlrc.yaml
Logs Of TS Server || GraphQL Language Service
I'm using WSL Ubuntu and also meet this problem.
However, after looking at extension.ts, it seems that the auto restart can not be achieved without looking into .graphqlrc.yml which is supposed to be loaded by GraphQLContentProvider.
After reading graphql-config document and graphql-content-provider.ts , contentProvider.schema may can give the schema url. But will fileEvents in vscode-languageclient works with remote url? I have no experience with VSCode extension and the whole architecture in extension.ts will change just for the feature. Maybe I can try it in my spare time.
I think this issue was caused by some lifecycle changes I made to prevent over-cacheing of SDL
A fix for this is inbound in #3521 !