Feat/validate query enhancement (#9705)
* feat(framework): Enhance query validation * feat(framework): Enhance query validation * feat(framework): Enhance query validation * feat(framework): Enhance query validation * fix * split restriction per http domain * fix * fix unit tests * fix middleware * cleanup allowed fields * update docs * missing allowed * export * missing allowed * missing fields * improvements * rm unnecessary fields * wip * update symbol support * update symbol support * update allowed * update allowed
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// TODO: Global todo, review all default fields to prevent over fetching by default
|
||||
export const defaultStoreCartFields = [
|
||||
"id",
|
||||
"currency_code",
|
||||
@@ -33,8 +34,13 @@ export const defaultStoreCartFields = [
|
||||
"promotions.application_method.value",
|
||||
"promotions.application_method.type",
|
||||
"promotions.application_method.currency_code",
|
||||
"items",
|
||||
"items.thumbnail",
|
||||
"region",
|
||||
"items.id",
|
||||
"items.product",
|
||||
"items.product.id",
|
||||
"items.variant",
|
||||
"items.variant_id",
|
||||
"items.product_id",
|
||||
"items.product.categories.id",
|
||||
|
||||
@@ -15,6 +15,10 @@ const defaultStoreCustomersFields = [
|
||||
|
||||
export const retrieveTransformQueryConfig = {
|
||||
defaults: defaultStoreCustomersFields,
|
||||
allowed: [
|
||||
...defaultStoreCustomersFields.map((f) => f.replace("*", "")),
|
||||
"orders",
|
||||
],
|
||||
isList: false,
|
||||
}
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ export const defaultStoreRetrieveReturnReasonFields = [
|
||||
"created_at",
|
||||
"updated_at",
|
||||
"deleted_at",
|
||||
"*.parent_return_reason",
|
||||
"*.return_reason_children",
|
||||
"*parent_return_reason",
|
||||
"*return_reason_children",
|
||||
]
|
||||
|
||||
export const retrieveTransformQueryConfig = {
|
||||
|
||||
Reference in New Issue
Block a user