Skip to content

Commit a0dc070

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

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

wundergraph_cli/src/print_schema/print_helper.rs

+10
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,16 @@ impl<'a> Display for GraphqlInsertable<'a> {
476476
let mut out = PadAdapter::new(f);
477477
writeln!(out)?;
478478
for c in self.table.column_data.iter().filter(|c| !c.has_default) {
479+
let is_pk = self
480+
.table
481+
.primary_key
482+
.iter()
483+
.filter(|x| **x == c.sql_name)
484+
.count()
485+
> 0;
486+
if is_pk {
487+
continue;
488+
}
479489
let t = GraphqlType {
480490
sql_type: &c.ty,
481491
allow_option: true,

0 commit comments

Comments
 (0)