2
0

product.resolvers.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. package graphql
  2. import (
  3. "context"
  4. "fmt"
  5. "github.com/gshopify/service-wrapper/server/middleware"
  6. "gshopper.com/gshopify/admin-api/graph/product/generated"
  7. )
  8. // ProductAppendImages is the resolver for the productAppendImages field.
  9. func (r *mutationResolver) ProductAppendImages(ctx context.Context, input generated.ProductAppendImagesInput) (*generated.ProductAppendImagesPayload, error) {
  10. panic(fmt.Errorf("not implemented: ProductAppendImages - productAppendImages"))
  11. }
  12. // ProductChangeStatus is the resolver for the productChangeStatus field.
  13. func (r *mutationResolver) ProductChangeStatus(ctx context.Context, productID string, status generated.ProductStatus) (*generated.ProductChangeStatusPayload, error) {
  14. panic(fmt.Errorf("not implemented: ProductChangeStatus - productChangeStatus"))
  15. }
  16. // ProductCreate is the resolver for the productCreate field.
  17. func (r *mutationResolver) ProductCreate(ctx context.Context, input generated.ProductInput, media []*generated.CreateMediaInput) (*generated.ProductCreatePayload, error) {
  18. panic(fmt.Errorf("not implemented: ProductCreate - productCreate"))
  19. }
  20. // ProductCreateMedia is the resolver for the productCreateMedia field.
  21. func (r *mutationResolver) ProductCreateMedia(ctx context.Context, productID string, media []*generated.CreateMediaInput) (*generated.ProductCreateMediaPayload, error) {
  22. panic(fmt.Errorf("not implemented: ProductCreateMedia - productCreateMedia"))
  23. }
  24. // ProductDelete is the resolver for the productDelete field.
  25. func (r *mutationResolver) ProductDelete(ctx context.Context, input generated.ProductDeleteInput) (*generated.ProductDeletePayload, error) {
  26. panic(fmt.Errorf("not implemented: ProductDelete - productDelete"))
  27. }
  28. // ProductDeleteImages is the resolver for the productDeleteImages field.
  29. func (r *mutationResolver) ProductDeleteImages(ctx context.Context, id string, imageIds []string) (*generated.ProductDeleteImagesPayload, error) {
  30. panic(fmt.Errorf("not implemented: ProductDeleteImages - productDeleteImages"))
  31. }
  32. // ProductDeleteMedia is the resolver for the productDeleteMedia field.
  33. func (r *mutationResolver) ProductDeleteMedia(ctx context.Context, productID string, mediaIds []string) (*generated.ProductDeleteMediaPayload, error) {
  34. panic(fmt.Errorf("not implemented: ProductDeleteMedia - productDeleteMedia"))
  35. }
  36. // ProductDuplicate is the resolver for the productDuplicate field.
  37. func (r *mutationResolver) ProductDuplicate(ctx context.Context, productID string, newTitle string, newStatus *generated.ProductStatus, includeImages *bool) (*generated.ProductDuplicatePayload, error) {
  38. panic(fmt.Errorf("not implemented: ProductDuplicate - productDuplicate"))
  39. }
  40. // ProductImageUpdate is the resolver for the productImageUpdate field.
  41. func (r *mutationResolver) ProductImageUpdate(ctx context.Context, productID string, image generated.ImageInput) (*generated.ProductImageUpdatePayload, error) {
  42. panic(fmt.Errorf("not implemented: ProductImageUpdate - productImageUpdate"))
  43. }
  44. // ProductJoinSellingPlanGroups is the resolver for the productJoinSellingPlanGroups field.
  45. func (r *mutationResolver) ProductJoinSellingPlanGroups(ctx context.Context, id string, sellingPlanGroupIds []string) (*generated.ProductJoinSellingPlanGroupsPayload, error) {
  46. panic(fmt.Errorf("not implemented: ProductJoinSellingPlanGroups - productJoinSellingPlanGroups"))
  47. }
  48. // ProductLeaveSellingPlanGroups is the resolver for the productLeaveSellingPlanGroups field.
  49. func (r *mutationResolver) ProductLeaveSellingPlanGroups(ctx context.Context, id string, sellingPlanGroupIds []string) (*generated.ProductLeaveSellingPlanGroupsPayload, error) {
  50. panic(fmt.Errorf("not implemented: ProductLeaveSellingPlanGroups - productLeaveSellingPlanGroups"))
  51. }
  52. // ProductReorderImages is the resolver for the productReorderImages field.
  53. func (r *mutationResolver) ProductReorderImages(ctx context.Context, id string, moves []*generated.MoveInput) (*generated.ProductReorderImagesPayload, error) {
  54. panic(fmt.Errorf("not implemented: ProductReorderImages - productReorderImages"))
  55. }
  56. // ProductReorderMedia is the resolver for the productReorderMedia field.
  57. func (r *mutationResolver) ProductReorderMedia(ctx context.Context, id string, moves []*generated.MoveInput) (*generated.ProductReorderMediaPayload, error) {
  58. panic(fmt.Errorf("not implemented: ProductReorderMedia - productReorderMedia"))
  59. }
  60. // ProductUpdate is the resolver for the productUpdate field.
  61. func (r *mutationResolver) ProductUpdate(ctx context.Context, input generated.ProductInput) (*generated.ProductUpdatePayload, error) {
  62. panic(fmt.Errorf("not implemented: ProductUpdate - productUpdate"))
  63. }
  64. // ProductUpdateMedia is the resolver for the productUpdateMedia field.
  65. func (r *mutationResolver) ProductUpdateMedia(ctx context.Context, productID string, media []*generated.UpdateMediaInput) (*generated.ProductUpdateMediaPayload, error) {
  66. panic(fmt.Errorf("not implemented: ProductUpdateMedia - productUpdateMedia"))
  67. }
  68. // ProductVariantAppendMedia is the resolver for the productVariantAppendMedia field.
  69. func (r *mutationResolver) ProductVariantAppendMedia(ctx context.Context, productID string, variantMedia []*generated.ProductVariantAppendMediaInput) (*generated.ProductVariantAppendMediaPayload, error) {
  70. panic(fmt.Errorf("not implemented: ProductVariantAppendMedia - productVariantAppendMedia"))
  71. }
  72. // ProductVariantCreate is the resolver for the productVariantCreate field.
  73. func (r *mutationResolver) ProductVariantCreate(ctx context.Context, input generated.ProductVariantInput) (*generated.ProductVariantCreatePayload, error) {
  74. panic(fmt.Errorf("not implemented: ProductVariantCreate - productVariantCreate"))
  75. }
  76. // ProductVariantDelete is the resolver for the productVariantDelete field.
  77. func (r *mutationResolver) ProductVariantDelete(ctx context.Context, id string) (*generated.ProductVariantDeletePayload, error) {
  78. panic(fmt.Errorf("not implemented: ProductVariantDelete - productVariantDelete"))
  79. }
  80. // ProductVariantDetachMedia is the resolver for the productVariantDetachMedia field.
  81. func (r *mutationResolver) ProductVariantDetachMedia(ctx context.Context, productID string, variantMedia []*generated.ProductVariantDetachMediaInput) (*generated.ProductVariantDetachMediaPayload, error) {
  82. panic(fmt.Errorf("not implemented: ProductVariantDetachMedia - productVariantDetachMedia"))
  83. }
  84. // ProductVariantJoinSellingPlanGroups is the resolver for the productVariantJoinSellingPlanGroups field.
  85. func (r *mutationResolver) ProductVariantJoinSellingPlanGroups(ctx context.Context, id string, sellingPlanGroupIds []string) (*generated.ProductVariantJoinSellingPlanGroupsPayload, error) {
  86. panic(fmt.Errorf("not implemented: ProductVariantJoinSellingPlanGroups - productVariantJoinSellingPlanGroups"))
  87. }
  88. // ProductVariantLeaveSellingPlanGroups is the resolver for the productVariantLeaveSellingPlanGroups field.
  89. func (r *mutationResolver) ProductVariantLeaveSellingPlanGroups(ctx context.Context, id string, sellingPlanGroupIds []string) (*generated.ProductVariantLeaveSellingPlanGroupsPayload, error) {
  90. panic(fmt.Errorf("not implemented: ProductVariantLeaveSellingPlanGroups - productVariantLeaveSellingPlanGroups"))
  91. }
  92. // ProductVariantUpdate is the resolver for the productVariantUpdate field.
  93. func (r *mutationResolver) ProductVariantUpdate(ctx context.Context, input generated.ProductVariantInput) (*generated.ProductVariantUpdatePayload, error) {
  94. panic(fmt.Errorf("not implemented: ProductVariantUpdate - productVariantUpdate"))
  95. }
  96. // ProductVariantsBulkCreate is the resolver for the productVariantsBulkCreate field.
  97. func (r *mutationResolver) ProductVariantsBulkCreate(ctx context.Context, variants []*generated.ProductVariantsBulkInput, productID string) (*generated.ProductVariantsBulkCreatePayload, error) {
  98. panic(fmt.Errorf("not implemented: ProductVariantsBulkCreate - productVariantsBulkCreate"))
  99. }
  100. // ProductVariantsBulkDelete is the resolver for the productVariantsBulkDelete field.
  101. func (r *mutationResolver) ProductVariantsBulkDelete(ctx context.Context, variantsIds []string, productID string) (*generated.ProductVariantsBulkDeletePayload, error) {
  102. panic(fmt.Errorf("not implemented: ProductVariantsBulkDelete - productVariantsBulkDelete"))
  103. }
  104. // ProductVariantsBulkReorder is the resolver for the productVariantsBulkReorder field.
  105. func (r *mutationResolver) ProductVariantsBulkReorder(ctx context.Context, productID string, positions []*generated.ProductVariantPositionInput) (*generated.ProductVariantsBulkReorderPayload, error) {
  106. panic(fmt.Errorf("not implemented: ProductVariantsBulkReorder - productVariantsBulkReorder"))
  107. }
  108. // ProductVariantsBulkUpdate is the resolver for the productVariantsBulkUpdate field.
  109. func (r *mutationResolver) ProductVariantsBulkUpdate(ctx context.Context, variants []*generated.ProductVariantsBulkInput, productID string) (*generated.ProductVariantsBulkUpdatePayload, error) {
  110. panic(fmt.Errorf("not implemented: ProductVariantsBulkUpdate - productVariantsBulkUpdate"))
  111. }
  112. // Product is the resolver for the product field.
  113. func (r *queryResolver) Product(ctx context.Context, id string) (*generated.Product, error) {
  114. var (
  115. inContext *middleware.GShopifyContext
  116. err error
  117. )
  118. if inContext, err = middleware.InContext(ctx); err != nil {
  119. return nil, err
  120. }
  121. panic(inContext)
  122. }
  123. // ProductByHandle is the resolver for the productByHandle field.
  124. func (r *queryResolver) ProductByHandle(ctx context.Context, handle string) (*generated.Product, error) {
  125. panic(fmt.Errorf("not implemented: ProductByHandle - productByHandle"))
  126. }
  127. // ProductResourceFeedback is the resolver for the productResourceFeedback field.
  128. func (r *queryResolver) ProductResourceFeedback(ctx context.Context, id string) (*generated.ProductResourceFeedback, error) {
  129. panic(fmt.Errorf("not implemented: ProductResourceFeedback - productResourceFeedback"))
  130. }
  131. // ProductSavedSearches is the resolver for the productSavedSearches field.
  132. func (r *queryResolver) ProductSavedSearches(ctx context.Context, after *string, before *string, first *int, last *int, reverse *bool) (*generated.SavedSearchConnection, error) {
  133. panic(fmt.Errorf("not implemented: ProductSavedSearches - productSavedSearches"))
  134. }
  135. // ProductVariant is the resolver for the productVariant field.
  136. func (r *queryResolver) ProductVariant(ctx context.Context, id string) (*generated.ProductVariant, error) {
  137. panic(fmt.Errorf("not implemented: ProductVariant - productVariant"))
  138. }
  139. // ProductVariants is the resolver for the productVariants field.
  140. func (r *queryResolver) ProductVariants(ctx context.Context, after *string, before *string, first *int, last *int, query *string, reverse *bool, savedSearchID *string, sortKey *generated.ProductVariantSortKeys) (*generated.ProductVariantConnection, error) {
  141. panic(fmt.Errorf("not implemented: ProductVariants - productVariants"))
  142. }
  143. // Products is the resolver for the products field.
  144. func (r *queryResolver) Products(ctx context.Context, after *string, before *string, first *int, last *int, query *string, reverse *bool, savedSearchID *string, sortKey *generated.ProductSortKeys) (*generated.ProductConnection, error) {
  145. panic(fmt.Errorf("not implemented: Products - products"))
  146. }
  147. // Mutation returns generated.MutationResolver implementation.
  148. func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResolver{r} }
  149. // Query returns generated.QueryResolver implementation.
  150. func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} }
  151. type mutationResolver struct{ *Resolver }
  152. type queryResolver struct{ *Resolver }