You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a basic example of codegen two TS schemas. You can see that QueryColorAllArgs is incorrectly documented. Unclear why it's getting the Query documentation (4) from version.ts.
colors.ts
exportdefaultgql` "1. Queries for retrieving colors" type Query { "2. Returns all colors" colors( "3. Filter colors by scope" scope: [String] ): [String] }`;
versions.ts
exportdefaultgql` "4. Queries for retrieving available versions" type Query { "5. Returns all available versions" versions: [String] }`;
types.ts
/** 4. Queries for retrieving available versions */exporttypeQuery={__typename?: 'Query';/** 2. Returns all colors */colors?: Maybe<Array<Maybe<Scalars['String']['output']>>>;/** 5. Returns all available versions */versions?: Maybe<Array<Maybe<Scalars['String']['output']>>>;};/** 4. Queries for retrieving available versions */exporttypeQueryColorsArgs={scope?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;};
I'm expecting argument comments from the schema to get correctly assigned in the output arg types OR at show no comments. Comments are incorrect assigned from another schema.
Which packages are impacted by your issue?
@graphql-codegen/cli, @graphql-codegen/typescript
Describe the bug
Here's a basic example of codegen two TS schemas. You can see that
QueryColorAllArgs
is incorrectly documented. Unclear why it's getting theQuery
documentation (4) from version.ts.colors.ts
versions.ts
types.ts
Your Example Website or App
https://github.com/bigtimebuddy/graphql-codegen-bug
Steps to Reproduce the Bug or Issue
npm install
npm test
Expected behavior
I'm expecting argument comments from the schema to get correctly assigned in the output arg types OR at show no comments. Comments are incorrect assigned from another schema.
Screenshots or Videos
No response
Platform
@graphql-codegen/cli
version: 5.0.3@graphql-codegen/typescript
version: 4.1.2Codegen Config File
overwrite: true
generates:
./src/generated/types.ts:
schema:
- "src/schemas/*.ts"
plugins:
- "typescript"
Additional context
No response
The text was updated successfully, but these errors were encountered: