The new Catalog collection needs a proper schema created. current schema
@nnnnat @aldeed Do we have enough information about the catalog to create a proper schema at this point? I'd like to get this scheduled in the next sprint if so.
@spencern Yes, the schema is pretty evident when looking at /imports/plugins/core/catalog/server/no-meteor/utils/createCatalogProduct.js
@aldeed A couple questions:
1) For the following itmes, do we just do an Object blackbox, or should I break them down into their own sub-schemas?
media
price
pricing
primaryImage
socialMetadata
variants
2) which fields are we requiring for a Catalog product, and which are optional? I've been matching it up with the existing Product schema, where I can, but there are some unique fields on the Catalog.
@kieckhafer Everything should have subschemas, no blackbox, but you can have variants and options share a single schema, where optionTitle is optional. This is how we do it in the GraphQL schema.
I think the GraphQL schema is also the best place to see what should be required. The two schemas are a very close match now. Take your best guess and then I can review this and see if any jump out at me as incorrectly required/optional.
Most helpful comment
@spencern Yes, the schema is pretty evident when looking at
/imports/plugins/core/catalog/server/no-meteor/utils/createCatalogProduct.js