2
0

metafield.go 370 B

1234567891011121314151617
  1. package graphql
  2. import (
  3. "github.com/gshopify/service-wrapper/model"
  4. "gshopper.com/gshopify/customer/graphql/generated"
  5. )
  6. func NewMetafield(key string, value any, t model.MetaFieldType) *generated.Metafield {
  7. m := &generated.Metafield{
  8. Namespace: "customer",
  9. Key: key,
  10. Value: model.MetaFieldValue(t, value),
  11. Type: t.String(),
  12. }
  13. return m
  14. }