Skip to content

[BUG] type error when using types.PluginsConfigdisableFederationDirectiveAndSclarInjection #495

Description

@LongLiveCHIEF

Describe the bug
Error in configuration when using disableFederationDirectiveAndScalarInjection: true:

**To Reproduce**

```typescript
const config: CodegenConfig = {
	importExtension: '.js',
	hooks: {
		afterAllFileWrite: ['prettier --write']
	},
	generates: {
		'src/gql': defineConfig({
			mode: 'modules',
			disableFederationDirectiveAndScalarInjection: true,
			typesPluginsConfig: {
				nonOptionalTypename: false,
				useIndexSignature: true,
				federation: true,
				disableFederationDirectiveAndScalarInjection: true,
			}
		})
	}
}

Expected behavior

This is a configuration option of typescript-resolvers plugin to support federation v2 and avoid duplicate type declarations during validation.

I would expect that it is recognized and allowed in the configuration passed to defineconfig.typesPluingsConfig

Screenshots
If applicable, add screenshots to help explain your problem.

Versions

  • OS: [e.g. MacOS, Windows, Linux]
  • OS Version:
  • Package name and version:

Additional context
Add any other context about the problem here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions