8000 Customer group pricing by royduin · Pull Request #1074 · rapidez/core · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@royduin
Copy link
Member
@royduin royduin commented Nov 14, 2025

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

@royduin royduin requested a review from Jade-GG November 14, 2025 09:28
@royduin royduin requested a review from indykoning as a code owner November 14, 2025 09:28
Jade-GG
Jade-GG previously approved these changes Nov 14, 2025
// 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.
Copy link
Collaborator

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.

Copy link
Member Author

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.

@Jade-GG
Copy link
Collaborator
Jade-GG commented Nov 14, 2025

Can you check the tests? Or are those being checked elsewhere?

Base automatically changed from feature/flat-tables to master November 14, 2025 10:34
@royduin royduin dismissed Jade-GG’s stale review November 14, 2025 10:34

The base branch was changed.

@royduin
Copy link
Member Author
royduin commented Nov 14, 2025

RAP-1656 is a follow up for the tests

Comment on lines +66 to +73
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')),
}
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: #1142

@royduin royduin merged commit b9e7865 into master Dec 2, 2025
6 of 15 checks passed
@royduin royduin deleted the flat-tables-customer-pricing branch December 2, 2025 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

0