dialect/sql/sqlgraph: support edgeschema in entgql (#2817)

This commit is contained in:
Ariel Mashraki
2022-08-01 18:18:12 +03:00
committed by GitHub
parent ea3aa8cf5b
commit 26e07c90c0
9 changed files with 2109 additions and 4 deletions

View File

@@ -36,6 +36,15 @@ var schemaGraph = func() *sqlgraph.Schema {
Type: field.{{ $n.ID.Type.ConstName }},
Column: {{ $n.Package }}.{{ $n.ID.Constant }},
},
{{- else }}
CompositeID: []*sqlgraph.FieldSpec{
{{- range $id := $n.EdgeSchema.ID }}
{
Type: field.{{ $id.Type.ConstName }},
Column: {{ $n.Package }}.{{ $id.Constant }},
},
{{- end }}
},
{{- end }}
},
Type: "{{ $n.Name }}",