Too many strings in GraphQL?
Closed this issue · 1 comments
magnus195 commented
I decided to copy the GraphQL schema to Mongoose and was a bit confused when I saw that there were only two integers. Stuff like prices and discounts were all strings, which I think can create issues further in development.
This is my current Mongoose Schema. Keep in mind that I've only added types and will add other properties soon.
{
productId: mongoose.Schema.Types.ObjectID,
productName: String,
description: String,
quantityType: String,
averageRating: Number,
reviewCount: Number,
category: String,
price: Number,
brandName: String,
brandLogoLink: String,
discount: Number,
discountedPrice: Number
}