Skip to content

Profiler file not written during watch mode #10382

@Eazash

Description

@Eazash

Which packages are impacted by your issue?

@graphql-codegen/cli

Describe the bug

When trying to debug performance issues with the watch mode, I noticed that the generator doesn't output a profile file. This only happens during watch mode, as regular codegen generates the file

Your Example Website or App

https://codesandbox.io/p/devbox/interesting-architecture-xtt6xd

Steps to Reproduce the Bug or Issue

  1. Run graphql-codegen --config ./codegen.ts --watch --profile
  2. Make changes to your documents
  3. Stop the watcher with Ctrl + C
  4. Observe that there is no codegen-[timestamp].json present

Expected behavior

I expect a codegen-[timestamp].json to be present

Screenshots or Videos

No response

Platform

  • OS: macOS
  • NodeJS: v20.12.1
  • @graphql-codegen/cli: ^5.0.6
  • @graphql-codegen/typescript: ^4.1.6
  • @graphql-codegen/typescript-operations: ^4.6.1
  • graphql: ^16.2.0

Codegen Config File

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions