~bigbes/core-go

72c2f060eb68703a58a01e4fa2a898f2165f9191 — Simon Ser 3 years ago bf4fe19
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
1 files changed, 2 insertions(+), 2 deletions(-)

M database/ql.go
M database/ql.go => database/ql.go +2 -2
@@ 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},
			})
		}
	}