Saleor Metadata 지원 모델

ModelWithMetadata mixin을 상속한 모델은 metadata(공개)와 private_metadata(비공개) JSON 필드를 갖는다. PostgreSQL JSONB + GIN 인덱스.

지원 모델 전체 목록

모듈모델
accountAddress, User
appApp
attributeAttribute
channelChannel
checkoutCheckoutMetadata*, CheckoutLine
discountVoucher, Promotion, Sale
giftcardGiftCard
invoiceInvoice
menuMenu, MenuItem
orderOrder, OrderLine, Fulfillment
pagePage, PageType
paymentPayment, TransactionItem
productCategory, ProductType, Product, ProductVariant, ProductMedia, Collection
shippingShippingZone, ShippingMethod
siteSiteSettings (Shop GraphQL 타입으로 노출)
taxTaxClass, TaxConfiguration
warehouseWarehouse

*Checkout은 직접 metadata 필드를 갖지 않고 CheckoutMetadata 테이블에 위임. GraphQL에서는 투명하게 처리됨.

크기 제한

명시적 limit 없음. 실질적 한계:

  • PostgreSQL TOAST 임계값(기본 toast_tuple_target ≈ 2KB) 초과 시 압축·오프페이지 저장 → GIN 인덱스 효율 저하
  • GraphQL 요청 body size는 reverse proxy 설정에 의존 (기본 1MB 전후)

관련: Saleor Metadata 쿼리와 필터, Saleor Extension Surface 개요