Skip to content
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

Order entity (admin) resolver misses customer @ResolveField #2715

Closed
mschipperheyn opened this issue Mar 4, 2024 · 0 comments
Closed

Order entity (admin) resolver misses customer @ResolveField #2715

mschipperheyn opened this issue Mar 4, 2024 · 0 comments
Assignees
Labels
type: bug 🐛 Something isn't working

Comments

@mschipperheyn
Copy link
Collaborator

Describe the bug
The order entity resolver doesn't resolve the customer field, instead relying on the service method to retrieve the relation in certain scenario's. That leads to unexpected customer: null if you access your order in another way, e.g. as a key in a custom entity.

To Reproduce
You can see this in the entity resolver.

Expected behavior
Any relevant relation IMHO should be resolveable through on the entity resolver and not rely on a service method implementation.

This also hooks in to the desire to have a dataloader to optimize these scenario's, e.g. when you're loading the same relation in a query over and over again, in order to aboid N+1 performance loss

Environment (please complete the following information):

  • @vendure/core version: 2.0.x
  • Nodejs version: 20
  • Database (mysql/postgres etc): postgres

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants