Reaction: Catalog collection needs proper schema

Created on 31 May 2018  路  4Comments  路  Source: reactioncommerce/reaction

Issue Description

The new Catalog collection needs a proper schema created. current schema

chore

Most helpful comment

@spencern Yes, the schema is pretty evident when looking at /imports/plugins/core/catalog/server/no-meteor/utils/createCatalogProduct.js

All 4 comments

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spencern picture spencern  路  3Comments

aaronjudd picture aaronjudd  路  3Comments

Eduard-Hasa picture Eduard-Hasa  路  4Comments

zikeji picture zikeji  路  4Comments

ajporlante picture ajporlante  路  4Comments