Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hare0319 opened this issue Dec 2, 2021 · 3 comments
Labels
lsp-server graphql-language-service-server vscode-graphql

Comments

@hare0319
Copy link

hare0319 commented Dec 2, 2021

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

@yar2001
Copy link

yar2001 commented Jan 10, 2022

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.

@acao
Copy link
Member

acao commented Apr 19, 2022

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

@acao acao transferred this issue from graphql/vscode-graphql Apr 19, 2022
@acao acao added vscode-graphql lsp-server graphql-language-service-server labels Apr 19, 2022
@acao acao changed the title Language server won't auto reload after the schema SDL file updated [schema first] Language server won't auto reload after the schema SDL file updated Mar 1, 2024
@acao
Copy link
Member

acao commented Mar 1, 2024

A fix for this is inbound in #3521 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lsp-server graphql-language-service-server vscode-graphql
Projects
None yet
Development

No branches or pull requests

3 participants