Skip to content

Commit

Permalink
CRUD Generator: Change the file ending of the private sibling GraphQL…
Browse files Browse the repository at this point in the history
… files from `.gql.tsx` to `.gql.ts` (#1464)
  • Loading branch information
raphaelblum authored Dec 7, 2023
1 parent 1d48d68 commit 6fda5a5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
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

0 comments on commit 6fda5a5

Please sign in to comment.