|
@@ -279,11 +279,16 @@ func (r *queryResolver) ProductTags(_ context.Context, first int) (*generated.St
|
|
|
return nil, err
|
|
|
}
|
|
|
|
|
|
- return helper.NewProductTagConnection(tags, &first, nil, nil)
|
|
|
+ return helper.NewStringConnection(tags, &first, nil, nil)
|
|
|
}
|
|
|
|
|
|
-func (r *queryResolver) ProductTypes(ctx context.Context, first int) (*generated.StringConnection, error) {
|
|
|
- panic("not implemented")
|
|
|
+func (r *queryResolver) ProductTypes(_ context.Context, first int) (*generated.StringConnection, error) {
|
|
|
+ types, err := r.db.ProductTypes()
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+
|
|
|
+ return helper.NewStringConnection(types, &first, nil, nil)
|
|
|
}
|
|
|
|
|
|
func (r *queryResolver) ProductRecommendations(ctx context.Context, productID string) ([]*generated.Product, error) {
|