-
Notifications
You must be signed in to change notification settings - Fork 13
Customer group pricing #1074
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
Customer group pricing #1074
Conversation
…nd enabled status
…into feature/flat-tables
…ature/flat-tables
…ature/flat-tables
…ature/flat-tables
…oduct price tests
| // TODO: Is there anything unsafe to share in here? | ||
| // Plus, maybe we could remove the GraphQL call? | ||
| // We're doing this for the customer group id | ||
| // GraphQL isn't explosing that value. |
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.
We could use Compadre for this. However, I don't know if that's too close to "requiring the use of compadre" which we don't necessarily want.
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.
Yea we don't want to require it, but not sure if this is ugly / insecure. It's working perfectly.
|
Can you check the tests? Or are those being checked elsewhere? |
|
RAP-1656 is a follow up for the tests |
| userStorage.value = { | ||
| ...(await magentoGraphQL(`{ customer { ${config.queries.customer} } }`))?.data?.customer, | ||
| // TODO: Is there anything unsafe to share in here? | ||
| // Plus, maybe we could remove the GraphQL call? | ||
| // We're doing this for the customer group id | ||
| // GraphQL isn't explosing that value. | ||
| ...(await rapidezAPI('get', 'customer')), | ||
| } |
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.
Due to both awaits here these calls are done synchronously.
We could work around this by awaiting a
const responses = Promise.all([
magentoGraphQL(`{ customer { ${config.queries.customer} } }`)).then((response) => response?.data?.customer),
rapidezAPI('get', 'customer'),
])
Or can we move this under an asyncComputed somewhere so it only does the RapidezAPI call on retrieval of the attributes the api would provide
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.
Fixed: #1142
Continuing on 7242ce4, with this we're seeing customer group pricing in listings and the price filter is working with it. The followup is RAP-1655 to implement the sorting.
For reference for the keying: #1062