From af406185564b7c28a75c176d4e0f81cb2cbdb584 Mon Sep 17 00:00:00 2001 From: esteban-url <14810250+esteban-url@users.noreply.github.com> Date: Fri, 3 Jan 2025 14:19:10 -0600 Subject: [PATCH] feat: showcase the use of relations --- .../scaffold/templates/components/NamesCell.tsx.template | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/commands/generate/scaffold/templates/components/NamesCell.tsx.template b/packages/cli/src/commands/generate/scaffold/templates/components/NamesCell.tsx.template index 23c15e94bdae..f0d5113b22b3 100644 --- a/packages/cli/src/commands/generate/scaffold/templates/components/NamesCell.tsx.template +++ b/packages/cli/src/commands/generate/scaffold/templates/components/NamesCell.tsx.template @@ -15,7 +15,12 @@ export const QUERY: TypedDocumentNode< > = gql` query Find${pluralPascalName} { ${pluralCamelName} {<% columns.forEach(column => { %> - <%= column.name %><% }) %> + <%= column.name %><% }) %><% relations.forEach(relation => { %> + ${relation} { + id + # Add the ${relation} fields you need here + } + <% }) %> } } `