Skip to content

ban-am/order-line-custom-relation-field-error

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1a25b28 · Apr 8, 2024

History

2 Commits
Apr 8, 2024
Apr 8, 2024
Apr 5, 2024
Apr 5, 2024
Apr 5, 2024
Apr 5, 2024
Apr 8, 2024
Apr 5, 2024
Apr 5, 2024
Apr 8, 2024
Apr 8, 2024
Apr 5, 2024
Apr 5, 2024

Repository files navigation

  1. create vendure2 postgres DB

yarn
yarn migration:run
yarn populate
yarn dev

open http://localhost:3000/shop-api

run

mutation addItemToOrder($productVariantId: ID!, $quantity: Int!, $customFields: OrderLineCustomFieldsInput!) {
  addItemToOrder(productVariantId: $productVariantId, quantity: $quantity, customFields: $customFields) {
    __typename
  }
}

Query Variables

{
  "productVariantId": "1", 
  "quantity": 1, 
  "customFields": {
    "materialId": "2"
  }
}

run

query activeOrder {
  activeOrder {
    ...OrderDetail
  }
}

fragment OrderDetail on Order {
  __typename
  lines {
    customFields {
      material {
        __typename
      }
    }
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published