@doswiftly/storefront-operations 1.0.6 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fragments.graphql +411 -16
- package/mutations.graphql +81 -0
- package/package.json +7 -7
- package/queries.graphql +220 -0
- package/schema.graphql +736 -29
package/queries.graphql
CHANGED
|
@@ -23,6 +23,19 @@ query Product($id: ID, $handle: String) {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
# Single-query configurator fetch (Faza 1 + Faza 1.5 — Decision D-A v3).
|
|
27
|
+
# Returns product details + union of set/scoped AttributeDefinitions filtered by CUSTOMER fillingMode.
|
|
28
|
+
# Showcase: hurtowniakopiarek.pl Konica Bizhub C258 — 4 customer text fields (from shared set)
|
|
29
|
+
# + Finiszer/Podstawa/Podajnik ADF (per-product scoped z linkedVariantId).
|
|
30
|
+
query ProductConfigurator($handle: String!, $fillingMode: String = "CUSTOMER") {
|
|
31
|
+
product(handle: $handle) {
|
|
32
|
+
...ProductFull
|
|
33
|
+
attributes(filter: { fillingMode: $fillingMode }) {
|
|
34
|
+
...ProductAttributeDefinition
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
26
39
|
query Products(
|
|
27
40
|
$first: Int = 20
|
|
28
41
|
$after: String
|
|
@@ -368,3 +381,210 @@ query ReferralStats {
|
|
|
368
381
|
...ReferralStats
|
|
369
382
|
}
|
|
370
383
|
}
|
|
384
|
+
|
|
385
|
+
# ============================================
|
|
386
|
+
# Reviews
|
|
387
|
+
# ============================================
|
|
388
|
+
|
|
389
|
+
query ProductReviews($productId: ID!, $first: Int = 10, $after: String, $sortKey: ReviewSortKey = CREATED_AT, $reverse: Boolean = true) {
|
|
390
|
+
productReviews(productId: $productId, first: $first, after: $after, sortKey: $sortKey, reverse: $reverse) {
|
|
391
|
+
edges {
|
|
392
|
+
node {
|
|
393
|
+
...ProductReview
|
|
394
|
+
}
|
|
395
|
+
cursor
|
|
396
|
+
}
|
|
397
|
+
pageInfo {
|
|
398
|
+
...PageInfo
|
|
399
|
+
}
|
|
400
|
+
totalCount
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
query ReviewStats($productId: ID!) {
|
|
405
|
+
reviewStats(productId: $productId) {
|
|
406
|
+
...ReviewStats
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
# ============================================
|
|
411
|
+
# Wishlists
|
|
412
|
+
# ============================================
|
|
413
|
+
|
|
414
|
+
query Wishlists {
|
|
415
|
+
wishlists {
|
|
416
|
+
...Wishlist
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
query WishlistById($id: ID!) {
|
|
421
|
+
wishlist(id: $id) {
|
|
422
|
+
...Wishlist
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
# ============================================
|
|
427
|
+
# Blog
|
|
428
|
+
# ============================================
|
|
429
|
+
|
|
430
|
+
query BlogPosts($first: Int = 20, $after: String, $categorySlug: String, $tagSlug: String, $featured: Boolean, $sortKey: BlogPostSortKey = PUBLISHED_AT, $reverse: Boolean = false) {
|
|
431
|
+
blogPosts(first: $first, after: $after, categorySlug: $categorySlug, tagSlug: $tagSlug, featured: $featured, sortKey: $sortKey, reverse: $reverse) {
|
|
432
|
+
edges {
|
|
433
|
+
node {
|
|
434
|
+
...BlogPost
|
|
435
|
+
}
|
|
436
|
+
cursor
|
|
437
|
+
}
|
|
438
|
+
pageInfo {
|
|
439
|
+
...PageInfo
|
|
440
|
+
}
|
|
441
|
+
totalCount
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
query BlogPost($id: ID, $slug: String) {
|
|
446
|
+
blogPost(id: $id, slug: $slug) {
|
|
447
|
+
...BlogPost
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
query BlogCategories {
|
|
452
|
+
blogCategories {
|
|
453
|
+
...BlogCategory
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
query BlogTags {
|
|
458
|
+
blogTags {
|
|
459
|
+
...BlogTag
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
# ============================================
|
|
464
|
+
# Recommendations
|
|
465
|
+
# ============================================
|
|
466
|
+
|
|
467
|
+
query ProductRecommendations($productId: ID!, $limit: Int = 8, $intent: RecommendationIntent = SIMILAR) {
|
|
468
|
+
productRecommendations(productId: $productId, limit: $limit, intent: $intent) {
|
|
469
|
+
...ProductCard
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
query SimilarProducts($productId: String!, $first: Int = 6) {
|
|
474
|
+
similarProducts(productId: $productId, first: $first) {
|
|
475
|
+
items {
|
|
476
|
+
...ProductRecommendation
|
|
477
|
+
}
|
|
478
|
+
totalCount
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
query CartRecommendations($cartId: String!, $first: Int = 4) {
|
|
483
|
+
cartRecommendations(cartId: $cartId, first: $first) {
|
|
484
|
+
...CartRecommendation
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
# ============================================
|
|
489
|
+
# Content: Pages
|
|
490
|
+
# ============================================
|
|
491
|
+
|
|
492
|
+
query Page($handle: String, $id: ID) {
|
|
493
|
+
page(handle: $handle, id: $id) {
|
|
494
|
+
...ShopPage
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
query Pages($first: Int = 20, $after: String, $sortKey: PageSortKeys = TITLE, $reverse: Boolean = false, $query: String) {
|
|
499
|
+
pages(first: $first, after: $after, sortKey: $sortKey, reverse: $reverse, query: $query) {
|
|
500
|
+
edges {
|
|
501
|
+
node {
|
|
502
|
+
...ShopPage
|
|
503
|
+
}
|
|
504
|
+
cursor
|
|
505
|
+
}
|
|
506
|
+
pageInfo {
|
|
507
|
+
...PageInfo
|
|
508
|
+
}
|
|
509
|
+
totalCount
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
# ============================================
|
|
514
|
+
# Content: Navigation Menus
|
|
515
|
+
# ============================================
|
|
516
|
+
|
|
517
|
+
query Menu($handle: String!) {
|
|
518
|
+
menu(handle: $handle) {
|
|
519
|
+
...Menu
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
# ============================================
|
|
524
|
+
# Content: URL Redirects
|
|
525
|
+
# ============================================
|
|
526
|
+
|
|
527
|
+
query UrlRedirects($first: Int = 250, $after: String) {
|
|
528
|
+
urlRedirects(first: $first, after: $after) {
|
|
529
|
+
nodes {
|
|
530
|
+
...UrlRedirect
|
|
531
|
+
}
|
|
532
|
+
pageInfo {
|
|
533
|
+
...PageInfo
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
# ============================================
|
|
539
|
+
# Store Availability: per-location stock (Shopify parity — BOPIS / multi-location)
|
|
540
|
+
# ============================================
|
|
541
|
+
# Field returns null for single-location shops (storefront can skip the store picker).
|
|
542
|
+
# `near`, `locationType`, and `@inContext(preferredLocationId)` shape the ordering.
|
|
543
|
+
|
|
544
|
+
query ProductStoreAvailability($handle: String, $id: ID) {
|
|
545
|
+
product(handle: $handle, id: $id) {
|
|
546
|
+
id
|
|
547
|
+
handle
|
|
548
|
+
title
|
|
549
|
+
variants {
|
|
550
|
+
...VariantStoreAvailability
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
# ============================================
|
|
556
|
+
# Locations (store picker UI, Shopify parity)
|
|
557
|
+
# ============================================
|
|
558
|
+
|
|
559
|
+
query Locations(
|
|
560
|
+
$first: Int = 20
|
|
561
|
+
$after: String
|
|
562
|
+
$near: GeoCoordinateInput
|
|
563
|
+
$hasPickupEnabled: Boolean
|
|
564
|
+
$locationType: LocationType
|
|
565
|
+
) {
|
|
566
|
+
locations(
|
|
567
|
+
first: $first
|
|
568
|
+
after: $after
|
|
569
|
+
near: $near
|
|
570
|
+
hasPickupEnabled: $hasPickupEnabled
|
|
571
|
+
locationType: $locationType
|
|
572
|
+
) {
|
|
573
|
+
totalCount
|
|
574
|
+
pageInfo {
|
|
575
|
+
...PageInfo
|
|
576
|
+
}
|
|
577
|
+
edges {
|
|
578
|
+
cursor
|
|
579
|
+
node {
|
|
580
|
+
...Location
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
query Location($id: ID!) {
|
|
587
|
+
location(id: $id) {
|
|
588
|
+
...Location
|
|
589
|
+
}
|
|
590
|
+
}
|