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

Watch not working #603

Closed
Rockson opened this issue Sep 24, 2018 · 6 comments
Closed

Watch not working #603

Rockson opened this issue Sep 24, 2018 · 6 comments

Comments

@Rockson
Copy link

Rockson commented Sep 24, 2018

Looks like the codegen watch is not working

const query = gql`
query MyQuery {
  field
}
`

when I change the query inside a gql tag it doesn't reload the types

@wesselvdv
Copy link

wesselvdv commented Oct 8, 2018

Same here, nothing happens with the watch flag.

I am running this inside a NodeJS 10 docker container.

EDIT:

Seems to be because I was using the package.json configuration object. Using the commandline options is working!

@slorber
Copy link

slorber commented Nov 12, 2018

Same, node 8.3.11, with the command apollo client:codegen --target typescript --addTypename --globalTypesFile ./src/AppApolloGlobalTypes.ts __genTypes__ --watch

@kevinhughes27
Copy link

kevinhughes27 commented Dec 5, 2018

Also not working for me. I tried both the flag and config object.

Edit - It is working it just doesn't have any output so I was confused.

@JakeDawkins
Copy link
Contributor

Can anyone confirm this is still an issue with the latest CLI version?

@timdev
Copy link

timdev commented Feb 17, 2019

@JakeDawkins - --watch works, but emits no output when it detects changes and regenerates code.

Coupled with a little bit of lag in an IDE, I got confused much like @kevinhughes27 was.

@JakeDawkins
Copy link
Contributor

Ha. As it turns out, this was just a 1-line change. It was already in the codebase, but was disabled at some point. I opened a PR to add logging back in :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants