Closed KaiseiSato closed 2 years ago
Thanks @KaiseiSato,
just to confirm if this is same issue with #160 did you enable PARRAEL_SOURCING
flag?
@cometkim
I have not changed the PARALLEL_SOURCING
flag.
So it's not enabled.
@cometkim Thank you for recognizing this as an issue. I don't mean to push you, but is it gonna be fixed anytime soon? If not, could you share us workarounds to avoid this issue?
@j-yamamoto I'm not gonna fix this issue in v2 but in v3. Watch #138 for the progress.
v3 fix this issue by introducing a scheduler that relies on actual schema/definitions change instead of the order of lifecycle API.
I recommend that to commit and review the generated type definitions together for better DX.
I recommend that to commit and review the generated type definitions together for better DX.
I admit it wasn't a good guide. Schema output was not stable in v2.
I fixed this (and also the schema output is now stable!) in v3 and it is available in the current RC version.
Please feel free to report another issue If this is reproduced after v3
Overview
When running
gatsby build
, type generation sometimes fails. The output file is generated. (e.g., gatsby-types.d.ts) I am using the Headless CMS service. The data type definitions are always generated successfully, but the query type generation fails sometimes. Most query types are generated correctly. But some types are sometimes completed without being generated. When it fails, I have confirmed that the processing order of the program is abnormal.Source for verification
gatsby-node.ts
Result when completed correctly
Result when not completed correctly