-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsupergraph.graphql
More file actions
4170 lines (3303 loc) · 106 KB
/
supergraph.graphql
File metadata and controls
4170 lines (3303 loc) · 106 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
schema
@link(url: "https://specs.apollo.dev/link/v1.0")
@link(url: "https://specs.apollo.dev/join/v0.3", for: EXECUTION)
@link(url: "https://specs.apollo.dev/inaccessible/v0.2", for: SECURITY)
{
query: Query
mutation: Mutation
}
directive @inaccessible on FIELD_DEFINITION | OBJECT | INTERFACE | UNION | ARGUMENT_DEFINITION | SCALAR | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION
directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE
directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION
directive @join__graph(name: String!, url: String!) on ENUM_VALUE
directive @join__implements(graph: join__Graph!, interface: String!) repeatable on OBJECT | INTERFACE
directive @join__type(graph: join__Graph!, key: join__FieldSet, extension: Boolean! = false, resolvable: Boolean! = true, isInterfaceObject: Boolean! = false) repeatable on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR
directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION
directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA
"""An address."""
interface Address implements Node
@join__implements(graph: ADDRESS, interface: "Node")
@join__type(graph: ADDRESS)
@join__type(graph: SHIPMENT)
{
"""The city part of the address"""
city: String! @join__field(graph: ADDRESS)
"""The company name part of the address"""
companyName: String @join__field(graph: ADDRESS)
"""The country part of the address"""
country: String! @join__field(graph: ADDRESS)
"""The ID of the node."""
id: UUID!
"""The name of the address"""
name: Name @join__field(graph: ADDRESS)
"""The postal code part of the address"""
postalCode: String! @join__field(graph: ADDRESS)
"""The first part of the street part of the address"""
street1: String! @join__field(graph: ADDRESS)
"""The second part of the street part of the address"""
street2: String! @join__field(graph: ADDRESS)
}
"""Input for the archiveShipmentMethod mutation."""
input ArchiveShipmentMethodInput
@join__type(graph: SHIPMENT)
{
"""The id of the shipment method to archive."""
id: UUID!
}
"""Input for the archiveUserAddress mutation."""
input ArchiveUserAddressInput
@join__type(graph: ADDRESS)
{
"""The id of the user address to archive."""
id: UUID!
}
"""Input for calculateShipmentFees query."""
input CalculateShipmentFeesInput
@join__type(graph: SHIPMENT)
@inaccessible
{
"""The items to calculate the shipment fees for."""
items: [ProductVariantVersionWithQuantityAndShipmentMethodInput!]!
}
"""A categorical characteristic of a category."""
type CategoricalCategoryCharacteristic implements CategoryCharacteristic & Node
@join__implements(graph: CATALOG, interface: "CategoryCharacteristic")
@join__implements(graph: CATALOG, interface: "Node")
@join__type(graph: CATALOG, key: "id", resolvable: true)
{
"""The Category this item belongs to."""
category: Category!
"""The description of the CategoryCharacteristic."""
description: String!
"""The ID of the node."""
id: UUID!
"""The name of the CategoryCharacteristic."""
name: String!
"""Get all associated values"""
values(
"""Number of items to return"""
first: Int
"""Ordering"""
orderBy: CategoricalCategoryCharacteristicValueOrderInput
"""Number of items to skip"""
skip: Int
): CategoricalCategoryCharacteristicValueConnection!
}
"""Input to create a CategoricalCategoryCharacteristic for a Category"""
input CategoricalCategoryCharacteristicInput
@join__type(graph: CATALOG)
{
"""The description of the CategoricalCategoryCharacteristic"""
description: String!
"""The name of the CategoricalCategoryCharacteristic"""
name: String!
}
"""A possible value for a categorical characteristic."""
type CategoricalCategoryCharacteristicValue implements CategoryCharacteristicValue
@join__implements(graph: CATALOG, interface: "CategoryCharacteristicValue")
@join__type(graph: CATALOG)
{
"""The associated CategoryCharacteristic this is a value of."""
characteristic: CategoryCharacteristic!
"""The value of the characteristic."""
value: String!
}
"""
A connection to a list of `CategoricalCategoryCharacteristicValue` values.
"""
type CategoricalCategoryCharacteristicValueConnection
@join__type(graph: CATALOG)
{
"""Whether this connection has a next page"""
hasNextPage: Boolean!
"""The resulting items."""
nodes: [CategoricalCategoryCharacteristicValue!]!
"""The total amount of items in this connection"""
totalCount: Int!
}
"""Input for creating a CategoricalCategoryCharacteristicValue."""
input CategoricalCategoryCharacteristicValueInput
@join__type(graph: CATALOG)
{
"""The id of the CategoryCharacteristic."""
characteristicId: UUID!
"""The value of the CategoricalCategoryCharacteristicValue."""
value: String!
}
"""CategoricalCategoryCharacteristicValue order fields"""
enum CategoricalCategoryCharacteristicValueOrderField
@join__type(graph: CATALOG)
{
"""Order CategoricalCategoryCharacteristicValue by their id"""
VALUE @join__enumValue(graph: CATALOG)
}
"""CategoricalCategoryCharacteristicValue order"""
input CategoricalCategoryCharacteristicValueOrderInput
@join__type(graph: CATALOG)
{
"""The direction to order by"""
direction: OrderDirection
"""The field to order by"""
field: CategoricalCategoryCharacteristicValueOrderField
}
"""A category"""
type Category implements Node
@join__implements(graph: CATALOG, interface: "Node")
@join__implements(graph: DISCOUNT, interface: "Node")
@join__type(graph: CATALOG, key: "id", resolvable: true)
@join__type(graph: DISCOUNT, key: "id", resolvable: true)
{
"""Get characteristics for the category"""
characteristics(
"""Number of items to return"""
first: Int
"""Ordering"""
orderBy: CategoryCharacteristicOrderInput
"""Number of items to skip"""
skip: Int
): CategoryCharacteristicConnection! @join__field(graph: CATALOG)
"""The description of the category."""
description: String! @join__field(graph: CATALOG)
"""The ID of the node."""
id: UUID!
"""The name of the category."""
name: String! @join__field(graph: CATALOG)
"""Get all associated products"""
products(
"""Filtering"""
filter: ProductFilterInput
"""Number of items to return"""
first: Int
"""Ordering"""
orderBy: ProductOrderInput
"""Number of items to skip"""
skip: Int
): ProductConnection! @join__field(graph: CATALOG)
"""Get all discounts which apply directly to this category"""
discounts(
"""Number of items to return"""
first: Int
"""Ordering"""
orderBy: DiscountOrderInput
"""Number of items to skip"""
skip: Int
): DiscountConnection! @join__field(graph: DISCOUNT)
}
"""A characteristic of a Category."""
interface CategoryCharacteristic implements Node
@join__implements(graph: CATALOG, interface: "Node")
@join__type(graph: CATALOG)
{
"""The Category this item belongs to."""
category: Category!
"""The description of the CategoryCharacteristic."""
description: String!
"""The ID of the node."""
id: UUID!
"""The name of the CategoryCharacteristic."""
name: String!
}
"""A connection to a list of `CategoryCharacteristic` values."""
type CategoryCharacteristicConnection
@join__type(graph: CATALOG)
{
"""Whether this connection has a next page"""
hasNextPage: Boolean!
"""The resulting items."""
nodes: [CategoryCharacteristic!]!
"""The total amount of items in this connection"""
totalCount: Int!
}
"""CategoryCharacteristic order fields"""
enum CategoryCharacteristicOrderField
@join__type(graph: CATALOG)
{
"""Order categoryCharacteristics by their id"""
ID @join__enumValue(graph: CATALOG)
}
"""CategoryCharacteristic order"""
input CategoryCharacteristicOrderInput
@join__type(graph: CATALOG)
{
"""The direction to order by"""
direction: OrderDirection
"""The field to order by"""
field: CategoryCharacteristicOrderField
}
"""A value for a CategoryCharacteristic."""
interface CategoryCharacteristicValue
@join__type(graph: CATALOG)
{
"""The associated CategoryCharacteristic this is a value of."""
characteristic: CategoryCharacteristic!
}
"""A connection to a list of `CategoryCharacteristicValue` values."""
type CategoryCharacteristicValueConnection
@join__type(graph: CATALOG)
{
"""Whether this connection has a next page"""
hasNextPage: Boolean!
"""The resulting items."""
nodes: [CategoryCharacteristicValue!]!
"""The total amount of items in this connection"""
totalCount: Int!
}
"""CategoryCharacteristicValue order fields"""
enum CategoryCharacteristicValueOrderField
@join__type(graph: CATALOG)
{
"""Order categoryCharacteristicValues by their id"""
ID @join__enumValue(graph: CATALOG)
}
"""CategoryCharacteristicValue order"""
input CategoryCharacteristicValueOrderInput
@join__type(graph: CATALOG)
{
"""The direction to order by"""
direction: OrderDirection
"""The field to order by"""
field: CategoryCharacteristicValueOrderField
}
"""A connection to a list of `Category` values."""
type CategoryConnection
@join__type(graph: CATALOG)
@join__type(graph: DISCOUNT)
{
"""Whether this connection has a next page"""
hasNextPage: Boolean!
"""The resulting items."""
nodes: [Category!]!
"""The total amount of items in this connection"""
totalCount: Int!
}
"""Category order fields"""
enum CategoryOrderField
@join__type(graph: CATALOG)
{
"""Order categories by their id"""
ID @join__enumValue(graph: CATALOG)
"""Order categories by their name"""
NAME @join__enumValue(graph: CATALOG)
}
"""Category order"""
input CategoryOrderInput
@join__type(graph: CATALOG)
{
"""The direction to order by"""
direction: OrderDirection
"""The field to order by"""
field: CategoryOrderField
}
"""Common order fields"""
enum CommonOrderField
@join__type(graph: CATALOG)
@join__type(graph: DISCOUNT)
@join__type(graph: ORDER)
@join__type(graph: RETURN)
@join__type(graph: SHOPPINGCART)
@join__type(graph: WISHLIST)
{
"""Order entities by their id"""
ID @join__enumValue(graph: CATALOG) @join__enumValue(graph: DISCOUNT) @join__enumValue(graph: ORDER) @join__enumValue(graph: RETURN) @join__enumValue(graph: SHOPPINGCART) @join__enumValue(graph: WISHLIST)
}
"""Discount order"""
input CommonOrderInput
@join__type(graph: CATALOG)
@join__type(graph: DISCOUNT)
@join__type(graph: ORDER)
@join__type(graph: RETURN)
@join__type(graph: SHOPPINGCART)
@join__type(graph: WISHLIST)
{
"""The direction to order by"""
direction: OrderDirection
"""The field to order by"""
field: CommonOrderField
}
"""A coupon"""
type Coupon implements Node
@join__implements(graph: DISCOUNT, interface: "Node")
@join__type(graph: DISCOUNT, key: "id", resolvable: true)
{
"""The code of the coupon."""
code: String!
"""The discount granted by this coupon."""
discount: Discount!
"""The ID of the node."""
id: UUID!
"""The maximum number of times the coupon can be used."""
maxUsages: Int
"""The number of times the coupon has been used."""
usages: Int!
"""Get all users who claimed this coupon."""
users(
"""Number of items to return"""
first: Int
"""Ordering"""
orderBy: CommonOrderInput
"""Number of items to skip"""
skip: Int
): UserConnection!
"""The date and time from which the coupon is valid."""
validFrom: DateTime!
"""The date and time until which the coupon is valid."""
validUntil: DateTime!
}
"""A connection to a list of `Coupon` values."""
type CouponConnection
@join__type(graph: DISCOUNT)
{
"""Whether this connection has a next page"""
hasNextPage: Boolean!
"""The resulting items."""
nodes: [Coupon!]!
"""The total amount of items in this connection"""
totalCount: Int!
}
"""Coupon filter"""
input CouponFilterInput
@join__type(graph: DISCOUNT)
{
"""
Filter weather the user with the provided id own the coupon, other users than the authenticated user require at least EMPLOYEE
"""
userHasCoupon: UUID
}
"""Coupon order fields"""
enum CouponOrderField
@join__type(graph: DISCOUNT)
{
"""Order coupons by their id"""
ID @join__enumValue(graph: DISCOUNT)
"""Order coupons by the valid from date"""
VALID_FROM @join__enumValue(graph: DISCOUNT)
"""Order coupons by the valid until date"""
VALID_UNTIL @join__enumValue(graph: DISCOUNT)
}
"""Coupon order"""
input CouponOrderInput
@join__type(graph: DISCOUNT)
{
"""The direction to order by"""
direction: OrderDirection
"""The field to order by"""
field: CouponOrderField
}
"""Input for the createCategoricalCategoryCharacteristic mutation"""
input CreateCategoricalCategoryCharacteristicInput
@join__type(graph: CATALOG)
{
"""The Category that the CategoricalCategoryCharacteristicI belongs to"""
categoryId: UUID!
"""The description of the CategoricalCategoryCharacteristic"""
description: String!
"""The name of the CategoricalCategoryCharacteristic"""
name: String!
}
"""Input for the createCategory mutation"""
input CreateCategoryInput
@join__type(graph: CATALOG)
{
"""The CategoricalCategoryCharacteristics of the Category"""
categoricalCharacteristics: [CategoricalCategoryCharacteristicInput!]!
"""The description of the Category"""
description: String!
"""The name of the Category"""
name: String!
"""The NumericalCategoryCharacteristics of the Category"""
numericalCharacteristics: [NumericalCategoryCharacteristicInput!]!
}
"""Input for the createCoupon mutation."""
input CreateCouponInput
@join__type(graph: DISCOUNT)
{
"""The code of the coupon."""
code: String!
"""The id of the discount the coupon is for."""
discountId: UUID!
"""The maximum number of times the coupon can be used."""
maxUsages: Int!
"""The date and time from which the coupon is valid."""
validFrom: DateTime!
"""The date and time until which the coupon is valid."""
validUntil: DateTime!
}
"""All required informations to save an credit card"""
input CreateCreditCardInformationInput
@join__type(graph: PAYMENT)
{
"""The card holders name"""
cardHolder: String!
"""The credit cards number"""
cardNumber: String!
"""The credit cards expiration date"""
expirationDate: String!
}
"""Input for the createDiscount mutation."""
input CreateDiscountInput
@join__type(graph: DISCOUNT)
{
"""The discount applied to the order item."""
discount: Float!
"""The category ids to which the discount applies."""
discountAppliesToCategoryIds: [UUID!]!
"""The product ids to which the discount applies."""
discountAppliesToProductIds: [UUID!]!
"""The product variant ids to which the discount applies."""
discountAppliesToProductVariantIds: [UUID!]!
"""
The maximum number of times a user can use this discount in bought ProductItems.
"""
maxUsagesPerUser: Int!
"""The minimum order amount required to use this discount."""
minOrderAmount: Int
"""The date and time from which the discount is valid."""
validFrom: DateTime!
"""The date and time until which the discount is valid."""
validUntil: DateTime!
}
"""Input for the createNotification mutation"""
input CreateNotificationInput
@join__type(graph: NOTIFICATION)
{
"""body of the notification to create"""
body: String!
"""title of the notification to create"""
title: String!
"""id of the user the notification should be sent to"""
userId: UUID!
}
"""Input for the createNumericalCategoryCharacteristic mutation"""
input CreateNumericalCategoryCharacteristicInput
@join__type(graph: CATALOG)
{
"""The Category that the NumericalCategoryCharacteristic belongs to"""
categoryId: UUID!
"""The description of the NumericalCategoryCharacteristic"""
description: String!
"""The name of the NumericalCategoryCharacteristic"""
name: String!
"""The unit of the NumericalCategoryCharacteristic"""
unit: String!
}
input CreateOrderInput
@join__type(graph: ORDER)
{
"""UUID of user owning the order."""
userId: UUID!
"""OrderItems of order."""
orderItemInputs: [OrderItemInput!]!
"""UUID of address to where the order should be shipped to."""
shipmentAddressId: UUID!
"""UUID of address of invoice."""
invoiceAddressId: UUID!
"""UUID of payment information that the order should be processed with."""
paymentInformationId: UUID!
"""Optional VAT number."""
vatNumber: String
}
"""Input for the createProduct mutation"""
input CreateProductInput
@join__type(graph: CATALOG)
{
"""The Categories this product is associated with."""
categoryIds: [UUID!]!
"""The default ProductVariant of the Product."""
defaultVariant: ProductVariantInput!
"""An internal name to identify the Product, not visible to customers."""
internalName: String!
"""If true, the Product is visible to customers."""
isPubliclyVisible: Boolean!
}
"""The input of a product item batch creation"""
input CreateProductItemBatchInput
@join__type(graph: INVENTORY)
{
"""The product variant id of the product item"""
productVariantId: UUID!
"""The number of products to add"""
number: Int!
}
"""Input for the createProductVariant mutation"""
input CreateProductVariantInput
@join__type(graph: CATALOG)
{
"""The initial ProductVariantVersion of the ProductVariant."""
initialVersion: ProductVariantVersionInput!
"""If true, the ProductVariant is visible to customers."""
isPubliclyVisible: Boolean!
"""The id of the Product this ProductVariant belongs to."""
productId: UUID!
}
"""Input for the createProductVariantVersion mutation"""
input CreateProductVariantVersionInput
@join__type(graph: CATALOG)
{
"""
The amount of days for which an instance of the ProductVariant can be returned after purchase, if null can be returned indefinitely.
"""
canBeReturnedForDays: Int
"""
The CategoricalCategoryCharacteristicValues of the ProductVariant, must be compatible with the Categories of the associated Product.
"""
categoricalCharacteristicValues: [CategoricalCategoryCharacteristicValueInput!]!
"""The description of the ProductVariant."""
description: String!
"""The associated Media files."""
mediaIds: [UUID!]!
"""The name of the ProductVariant."""
name: String!
"""
The NumericalCategoryCharacteristicValues of the ProductVariant, must be compatible with the Categories of the associated Product.
"""
numericalCharacteristicValues: [NumericalCategoryCharacteristicValueInput!]!
"""The id of the ProductVariant this ProductVariantVersion belongs to."""
productVariantId: UUID!
"""The retail price of the ProductVariant."""
retailPrice: Int!
"""The associated TaxRate"""
taxRateId: UUID!
"""The weight of a single instance of the ProductVariant."""
weight: Float!
}
"""Input for the createReturn mutation"""
input CreateReturnInput
@join__type(graph: RETURN)
{
"""
The order items to return, must belong to the same order and must not be already returned.
"""
orderItemIds: [UUID!]!
"""The reason for the return."""
reason: String!
}
input CreateReviewInput
@join__type(graph: REVIEW)
{
"""UUID of user owning the review."""
userId: UUID!
"""UUID of product variant in review."""
productVariantId: UUID!
"""Body of review."""
body: String!
"""Rating of review in 1-5 stars."""
rating: Rating!
"""Flag if review is visible, by default set to true."""
isVisible: Boolean
}
"""Input for the createShipmentMethod mutation."""
input CreateShipmentMethodInput
@join__type(graph: SHIPMENT)
{
"""The base fees for the shipment method."""
baseFees: Int!
"""The description of the shipment method."""
description: String!
"""
The reference of the shipment method used by the external shipment provider.
"""
externalReference: String!
"""The fees per item for the shipment method."""
feesPerItem: Int!
"""The fees per kg for the shipment method."""
feesPerKg: Int!
"""The name of the shipment method."""
name: String!
}
input CreateShoppingCartItemInput
@join__type(graph: SHOPPINGCART)
{
"""UUID of user owning the shopping cart."""
id: UUID!
"""shopping cart item in shopping cart to update"""
shoppingCartItem: ShoppingCartItemInput!
}
"""Input for the createTaxRate mutation"""
input CreateTaxRateInput
@join__type(graph: TAX)
{
"""The description of the created TaxRate"""
description: String!
"""The initial version of the created TaxRate"""
initialVersion: TaxRateVersionInput!
"""The name of the created TaxRate"""
name: String!
}
"""Input for the createTaxRateVersion mutation"""
input CreateTaxRateVersionInput
@join__type(graph: TAX)
{
"""The rate of the created TaxRateVersion"""
rate: Float!
"""The id of the TaxRate the created TaxRateVersion belongs to"""
taxRateId: UUID!
}
"""Input for the createUserAddress mutation."""
input CreateUserAddressInput
@join__type(graph: ADDRESS)
{
"""The city part of the address to create"""
city: String!
"""The company name part of the address to create"""
companyName: String
"""The country part of the address to create"""
country: String!
"""The name of the address to create"""
name: NameInput
"""The postal code part of the address to create"""
postalCode: String!
"""The first part of the street part of the address to create"""
street1: String!
"""The second part of the street part of the address to create"""
street2: String!
"""The id of the user to create the address for."""
userId: UUID!
}
"""Input for the createVendorAddress mutation."""
input CreateVendorAddressInput
@join__type(graph: ADDRESS)
{
"""The city part of the address to create"""
city: String!
"""The company name part of the address to create"""
companyName: String
"""The country part of the address to create"""
country: String!
"""The name of the address to create"""
name: NameInput
"""The postal code part of the address to create"""
postalCode: String!
"""The first part of the street part of the address to create"""
street1: String!
"""The second part of the street part of the address to create"""
street2: String!
}
input CreateWishlistInput
@join__type(graph: WISHLIST)
{
"""UUID of user owning the wishlist."""
userId: UUID!
"""UUIDs of product variants in wishlist."""
productVariantIds: [UUID!]!
"""Wishlist name."""
name: String!
}
"""An RFC-3339 compliant Full Date Scalar"""
scalar Date
@join__type(graph: USER)
"""A slightly refined version of RFC-3339 compliant DateTime Scalar"""
scalar DateTime
@join__type(graph: ADDRESS)
@join__type(graph: CATALOG)
@join__type(graph: DISCOUNT)
@join__type(graph: INVOICE)
@join__type(graph: NOTIFICATION)
@join__type(graph: ORDER)
@join__type(graph: PAYMENT)
@join__type(graph: RETURN)
@join__type(graph: REVIEW)
@join__type(graph: SHIPMENT)
@join__type(graph: SHOPPINGCART)
@join__type(graph: TAX)
@join__type(graph: USER)
@join__type(graph: WISHLIST)
"""
A discount.
Multiple discounts are applied multiplicatively:
discounted = original * (1 - discount1) * (1 - discount2) * ...
"""
type Discount implements Node
@join__implements(graph: DISCOUNT, interface: "Node")
@join__type(graph: DISCOUNT, key: "id", resolvable: true)
@join__type(graph: ORDER, key: "id", resolvable: false)
{
"""
The discount applied to the order item, e.g. 0.2 meaning a 20% reduction in price.
Multiple discounts are applied multiplicatively:
discounted = original * (1 - discount1) * (1 - discount2) * ...
"""
discount: Float! @join__field(graph: DISCOUNT)
"""Get all categories to which this discount directly applies"""
discountAppliesToCategories(
"""Number of items to return"""
first: Int
"""Ordering"""
orderBy: CommonOrderInput
"""Number of items to skip"""
skip: Int
): CategoryConnection! @join__field(graph: DISCOUNT)
"""Get all product variants to which this discount directly applies"""
discountAppliesToProductVariants(
"""Number of items to return"""
first: Int
"""Ordering"""
orderBy: CommonOrderInput
"""Number of items to skip"""
skip: Int
): ProductVariantConnection! @join__field(graph: DISCOUNT)
"""Get all products to which this discount directly applies"""
discountAppliesToProducts(
"""Number of items to return"""
first: Int
"""Ordering"""
orderBy: CommonOrderInput
"""Number of items to skip"""
skip: Int
): ProductConnection! @join__field(graph: DISCOUNT)
"""Get all product variants to which this discount directly applies"""
discountRequiresCoupon(
"""Filtering"""
filter: CouponFilterInput
"""Number of items to return"""
first: Int
"""Ordering"""
orderBy: CouponOrderInput
"""Number of items to skip"""
skip: Int
): CouponConnection! @join__field(graph: DISCOUNT)
"""Get all the usages of this discount by all users."""
discountUsages(
"""Number of items to return"""
first: Int
"""Ordering"""
orderBy: DiscountUsageOrderInput
"""Number of items to skip"""
skip: Int
): DiscountUsageConnection! @join__field(graph: DISCOUNT)
"""The ID of the node."""
id: UUID!
"""
The maximum number of times a user can use this discount in bought ProductItems.
"""
maxUsagesPerUser: Int @join__field(graph: DISCOUNT)
"""The minimum order amount required to use this discount."""
minOrderAmount: Int @join__field(graph: DISCOUNT)
"""The date and time from which the discount is valid."""
validFrom: DateTime! @join__field(graph: DISCOUNT)
"""The date and time until which the discount is valid."""
validUntil: DateTime! @join__field(graph: DISCOUNT)
}
"""A connection to a list of `Discount` values."""
type DiscountConnection
@join__type(graph: DISCOUNT)
@join__type(graph: ORDER)
{
"""Whether this connection has a next page"""