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
It would be very useful if Codegen could append the generated code directly to the file where the query is defined, instead of creating a separate file for the generated types.
Example
Consider the following example. I have a file named my.graphql.ts with the following content:
gql`
query hello {
user {
name
email
}
}
`;
When I run Codegen, it would be great if the generated code could be appended to the end of this file, with a special comment indicating which part of the code is generated. This would help ensure that subsequent generations know which code to replace, without overwriting any custom code that developers might add around the query.
Benefit
This approach would help us avoid the need for additional files just to store generated types
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
It would be very useful if Codegen could append the generated code directly to the file where the query is defined, instead of creating a separate file for the generated types.
Example
Consider the following example. I have a file named
my.graphql.ts
with the following content:When I run Codegen, it would be great if the generated code could be appended to the end of this file, with a special comment indicating which part of the code is generated. This would help ensure that subsequent generations know which code to replace, without overwriting any custom code that developers might add around the query.
Benefit
This approach would help us avoid the need for additional files just to store generated types
Beta Was this translation helpful? Give feedback.
All reactions