From 72c2f060eb68703a58a01e4fa2a898f2165f9191 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 16 Aug 2023 12:00:33 +0000 Subject: [PATCH] database: specify field name for graphql.CollectedField Newer versions of the graphql package add new fields to this struct. This results in errors: database/ql.go:40:4: too few values in struct literal of type graphql.CollectedField database/ql.go:71:4: too few values in struct literal of type graphql.CollectedField --- database/ql.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database/ql.go b/database/ql.go index dc9ddaaae911b7a2e517ec9c8d7a5b969349487b..088b98af8cf179d317d0c5561dab8ca29c866fcb 100644 --- a/database/ql.go +++ b/database/ql.go @@ -36,7 +36,7 @@ func Scan(ctx context.Context, m Model) []interface{} { // Collect all fields if we are not in an active graphql context for _, field := range m.Fields().All() { qlFields = append(qlFields, graphql.CollectedField{ - &ast.Field{Name: field.GQL}, nil, + Field: &ast.Field{Name: field.GQL}, }) } } @@ -67,7 +67,7 @@ func Columns(ctx context.Context, m Model) []string { // Collect all fields if we are not in an active graphql context for _, field := range m.Fields().All() { fields = append(fields, graphql.CollectedField{ - &ast.Field{Name: field.GQL}, nil, + Field: &ast.Field{Name: field.GQL}, }) } }