-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrough
78 lines (61 loc) · 2.84 KB
/
rough
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package graph
// This file will be automatically regenerated based on the schema, any resolver implementations
// will be copied through when generating and any unknown code will be moved to the end.
import (
"context"
"fmt"
"projectSchema/generated"
"projectSchema/models"
)
func (r *queryResolver) Vendor(ctx context.Context, id string) (*models.Vendor, error) {
fmt.Print("-------------\n\n\n\nin vendor\n\n\n---------------")
return &models.Vendor{Description: "abc", PlatformVendorId: "123"}, nil
}
func (r *vendorResolver) Tes(ctx context.Context, obj *models.Vendor) (*models.TES, error) {
fmt.Print("-------------\n\n\n\nin tes\n\n\n---------------")
return &models.TES{MinimumDeliverTime: "123"}, nil
}
func (r *vendorResolver) Dps(ctx context.Context, obj *models.Vendor) (*models.DPS, error) {
fmt.Print("-------------- \n\n\n in dps \n\n\n -------------")
return &models.DPS{MinimumOrderAmount: "dps"}, nil
}
// Query returns generated.QueryResolver implementation.
func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} }
// Vendor returns generated.VendorResolver implementation.
func (r *Resolver) Vendor() generated.VendorResolver { return &vendorResolver{r} }
type queryResolver struct{ *Resolver }
type vendorResolver struct{ *Resolver }
///////////////////////////////////
package graph
// This file will be automatically regenerated based on the schema, any resolver implementations
// will be copied through when generating and any unknown code will be moved to the end.
import (
"context"
"fmt"
"projectSchema/generated"
"projectSchema/models"
)
func (r *queryResolver) Vendor(ctx context.Context, id string) (*models.Vendor, error) {
fmt.Print("-------------\n\n\n\nin vendor\n\n\n---------------")
return &models.Vendor{Description: "abc", PlatformVendorId: "123"}, nil
}
func (r *vendorResolver) Tes(ctx context.Context, obj *models.Vendor) (*models.TES, error) {
fmt.Print("-------------\n\n\n\nin tes\n\n\n---------------")
return &models.TES{MinimumDeliverTime: "123"}, nil
}
func (r *vendorResolver) Dps(ctx context.Context, obj *models.Vendor) (*models.DPS, error) {
fmt.Print("-------------- \n\n\n in dps \n\n\n -------------")
return &models.DPS{MinimumOrderAmount: "dps"}, nil
}
func (r *vendorResolver) Schedules(ctx context.Context, obj *models.Vendor) ([]*models.Schedule, error) {
fmt.Print("-------------- \n\n\n in schedule \n\n\n -------------")
id := "123"
weekday := "monday"
return []*models.Schedule{{ID: &id, Weekday: &weekday}}, nil
}
// Query returns generated.QueryResolver implementation.
func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} }
// Vendor returns generated.VendorResolver implementation.
func (r *Resolver) Vendor() generated.VendorResolver { return &vendorResolver{r} }
type queryResolver struct{ *Resolver }
type vendorResolver struct{ *Resolver }