graphiql icon indicating copy to clipboard operation
graphiql copied to clipboard

[schema first] Language server won't auto reload after the schema SDL file updated

Open hare0319 opened this issue 4 years ago • 3 comments

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

hare0319 avatar Dec 02 '21 14:12 hare0319

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.

yar2001 avatar Jan 10 '22 14:01 yar2001

I think this issue was caused by some lifecycle changes I made to prevent over-cacheing of SDL

acao avatar Apr 19 '22 18:04 acao

A fix for this is inbound in #3521 !

acao avatar Mar 01 '24 22:03 acao