-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/skip simulation #27
base: master
Are you sure you want to change the base?
Changes from all commits
798951e
55bde40
1e1ad38
5a4bcbd
d3c40aa
0bff87b
ce72424
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,20 @@ export const resolvers = { | |
const quantity = resources.split('/')[1] | ||
return parseInt(quantity, 10) | ||
}, | ||
products: path(['productsRaw', 'data']), | ||
products: ({ | ||
translatedArgs: { skipSimulation }, | ||
productsRaw: { data }, | ||
}: ProductSearchParent) => { | ||
return data.map(product => { | ||
return { | ||
...product, | ||
items: product.items.map(item => ({ | ||
...item, | ||
skippedSimulation: !!skipSimulation, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Skip simulation is a boolean, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it might be null or undefined, lets say someone pass the wrong value in the resolver above the tree. I think this is safer. |
||
})), | ||
} | ||
}) | ||
}, | ||
breadcrumb: async ( | ||
{ translatedArgs, productsRaw: { data: products } }: ProductSearchParent, | ||
_: any, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change metric name to be different from products
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its supposed to be the same thing, just had to do this for typings. Its still hitting the same url with the same variables. For me, it should be the same. I will ask for a third opinion.