Skip to content

graphql-codegen with graphql > 17.0.0.alpha.7 #10585

@Fyro-Ing

Description

@Fyro-Ing

Which packages are impacted by your issue?

@graphql-codegen/visitor-plugin-common

Describe the bug

I use graphql 17.alpha.2, and i try to upgrade with apollo server 5 & graphql17.alpha9 (@defer and @ stream)

graphql-codegen is ok until 17.0.0.alpha.7 but with alpha8 or alpha9, there is an error when codegen instrospect @deprecated directive

const deprecationDirective = node.directives.find(v => v.name.value === 'deprecated');

node.directives is undefined, on alpha7, it's an empty array

Minimal reproduction repository :
https://github.com/Fyro-Ing/graphql17.alpha9

Your Example Website or App

https://github.com/Fyro-Ing/graphql17.alpha9

Steps to Reproduce the Bug or Issue

npm run generate

Expected behavior

graphql-codegen generate files

Screenshots or Videos

No response

Platform

  • OS: [Linux]
  • NodeJS: [e.g. 24]
  • graphql version: [17.0.0-alpha.8]
  • @graphql-codegen/* version(s): [6.1.1]

Codegen Config File

schema: './src/graphql/schema.graphql'
generates:
./src/graphql/schema.graphql.ts:
preset: '@eddeee888/gcg-typescript-resolver-files'

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