Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRUD Generator: Change the file ending of the private sibling GraphQL files from .gql.tsx to .gql.ts #1464

Merged
merged 3 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/fuzzy-islands-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@comet/cms-admin": minor
---

CRUD Generator: Change the file ending of the private sibling GraphQL files from `.gql.tsx` to `.gql.ts`

The GraphQL files do not contain JSX.
Regenerate the files to apply this change to a project.
2 changes: 1 addition & 1 deletion packages/admin/cms-admin/src/generator/generateForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export async function writeCrudForm(generatorConfig: CrudGeneratorConfig, schema
\`;

`;
writeGenerated(`${targetDirectory}/${entityName}Form.gql.tsx`, outGql);
writeGenerated(`${targetDirectory}/${entityName}Form.gql.ts`, outGql);

const numberFields = formFields.filter((field) => {
const type = field.type.kind === "NON_NULL" ? field.type.ofType : field.type;
Expand Down