Possible?
What I have in GraphQL schema:
""" New user account input fields """
input SignUpDetails {
""" First name """
firstName: String!
""" Last name """
lastName: String!
""" Email address """
email: EmailAddress!
""" User role """
role: UserRole!
""" A legit and secure password """
password: String!
""" Repeat password """
passwordRepeat: String!
""" Language """
language: String = "en-US"
""" Timezone """
timezone: String = "UTC"
""" CAPTCHA verification code """
captcha: String
}
What I expect:
export type SignUpDetails = {
/** First name */
firstName: string,
/** Last name */
lastName: string,
/** Email address */
email: EmailAddress,
/** User role */
role: UserRole,
/** A legit and secure password */
password: string,
/** Repeat password */
passwordRepeat: string,
/** Language */
language: ?string,
/** Timezone */
timezone: ?string,
/** CAPTCHA verification code */
captcha: ?string
}
What I got:
export type SignUpDetails = {
firstName: string,
lastName: string,
email: EmailAddress,
role: UserRole,
password: string,
passwordRepeat: string,
language: ?string,
timezone: ?string,
captcha: ?string
};
Is it possible to include comments?
I think we broke description in 1.0.0, will fix soon.
Waiting for the next release.
Fixed in 1.0.1 馃殌
Still, no comments in the output file or I am doing wrong?
GraphQL Schema
""" New user account input fields """
input SignUpDetails {
""" First name """
firstName: String!
""" Last name """
lastName: String!
""" Email address """
email: EmailAddress!
""" User role """
role: UserRole!
""" A legit and secure password """
password: String!
""" Repeat password """
passwordRepeat: String!
""" Language """
language: String = "en-US"
""" Timezone """
timezone: String = "UTC"
""" CAPTCHA verification code """
captcha: String
}
File: codegen.yml
overwrite: true
schema: "http://api.test:3000/graphql"
generates:
flow-typed/output-file-graphql.js:
plugins:
- flow
What I got:
export type SignUpDetails = {
firstName: string,
lastName: string,
email: EmailAddress,
role: UserRole,
password: string,
passwordRepeat: string,
language: ?string,
timezone: ?string,
captcha: ?string
};
Is there anything I have to do?
@blacksmoke26 I added a test with your example:
https://github.com/dotansimha/graphql-code-generator/blob/8061d5ff7e0d82a2ab4554b3020e41aa9a733a3d/packages/plugins/flow/tests/flow.spec.ts#L8
It seems to work. Are you sure you updated ALL codegen packages to use the same version?
Yeah, double checked, Will remove all then try again.
Fixed now. Uninstall and install all packages, working now. Thank You!
Most helpful comment
Fixed now. Uninstall and install all packages, working now. Thank You!