Skip to content

Commit f74b50c

Browse files
author
Alexei Pastuchov
committed
Display implementation of GraphqlInsertable filters out primary keys
1 parent a008075 commit f74b50c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wundergraph_cli/src/print_schema/print_helper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ impl<'a> Display for GraphqlInsertable<'a> {
475475
{
476476
let mut out = PadAdapter::new(f);
477477
writeln!(out)?;
478-
for c in self.table.column_data.iter().filter(|c| !c.has_default) {
478+
for c in self.table.column_data.iter().filter(|c| !c.has_default && self.table.primary_key.iter().filter(|x| **x == c.sql_name).count() == 0) {
479479
let t = GraphqlType {
480480
sql_type: &c.ty,
481481
allow_option: true,

0 commit comments

Comments
 (0)