graphql-code-generator icon indicating copy to clipboard operation
graphql-code-generator copied to clipboard

programmatic usage errorsOnly regression

Open Moumouls opened this issue 2 years ago • 5 comments

Which packages are impacted by your issue?

@graphql-codegen/cli

Describe the bug

errorsOnly:true does not suppress status logs

✔ Parse Configuration
✔ Generate outputs

Your Example Website or App

none

Steps to Reproduce the Bug or Issue

Install version 3 of codegen cli, use

Use programatic usage like

	await generate(
		{
			schema: `${__dirname}/../../${name}/generated/schema.graphql`,
			documents: folders.map(
				(folder) => `${pwd}/${folder}/**/*.${name}.graphql`,
			),
			generates: {
				[`${pwd}/generated/${name}.graphql.ts`]: presets[preset],
			},
			errorsOnly: true,
			watch,
		},
		true,
	)

Expected behavior

To not log

✔ Parse Configuration
✔ Generate outputs

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • NodeJS: [e.g. 18.5.0]
  • graphql version: [e.g. 16.3.0]
  • @graphql-codegen/* version(s): 3.0.0

Codegen Config File

No response

Additional context

No response

Moumouls avatar Feb 08 '23 20:02 Moumouls

Hi @n1ru4l, not related to Parse Server, but in my company project i noticed the regression

Moumouls avatar Feb 08 '23 20:02 Moumouls

Any workarounds?

Newbie012 avatar Apr 25 '23 23:04 Newbie012

Not sure if this is related, but also with @graphql-codegen/[email protected] I'm not able to suppress regular logs in dev mode.

I'm using this as a workaround:

"dev": "concurrently \"next dev\" \"yarn codegen --watch\" --hide 1",

amannn avatar Aug 03 '23 14:08 amannn

That silences errors as well, no?

flying-sheep avatar Oct 21 '23 17:10 flying-sheep

Reported in this issue previously https://github.com/dotansimha/graphql-code-generator/issues/8477

marco2216 avatar Mar 21 '24 16:03 marco2216