Open nodkz opened 4 years ago
I have tried this workaround but it seems the File Watcher extension only picks up changes that are done inside vscode. For example if i touch or modify the schema file in vim it will not run.
I am using https://graphql-code-generator.com/ to generate the schema.graphql file so i am still looking for a solution for this.
@karibertils I also use graphql-code-generator, my solution was to add a script to package.json such as:
"gql:codegen": "graphql-codegen --config codegen.yml && touch apollo.config.js",
For now, I'm using monorepo with server and client. And when my watch scripts regenerate schema file I need to manually reload
Apollo: Reload Schema
(apollographql/reloadService
).It will be nice if vs-code plugin reloads automatically with new
localSchemaFile
data.Need to extend somehow the following code: https://github.com/apollographql/apollo-tooling/blob/master/packages/apollo-language-server/src/server.ts#L133
But for now I found a workaround
You need to install File Watcher extension and add the following config to :
.vscode/settings.json
:touch
command will refreshapollo.config.js
and Apollo for VSCode will catch these changes and reload the schema file.