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

Add productVariantId,orderId to OrderLine api, orderId column to OrderLine #3291

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mschipperheyn
Copy link
Collaborator

Description

I cannot tell you how much time I spent on performance related issues caused by needing access to the orderId from an OrderLine without having access to the root order.

Vendure strongly assumes that orderLines and payments are accessed through the order. And normally, that's the case. However, there are a number of scenario's where you might want to access the orderId or productVariantId without loading those entities. And you might not have the root order entity handy. It's a scenario common to us.

Also, Vendure should IMHO optimize for getting all ManyToOne columns easily through GraphQL and code, without having to load the entire entity if all you need is the id. Which IS a common scenario.

I want to push another PR which addreses ALL of the columns and ManyToOne relations, but let's see how this one goes first :-)

Breaking changes

No

Screenshots

Checklist

📌 Always:

  • [x ] I have set a clear title
  • [x ] My PR is small and contains a single feature
  • [ x] I have checked my own PR

👍 Most of the time:

  • I have added or updated test cases
  • I have updated the README if needed

Copy link

vercel bot commented Dec 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Dec 23, 2024 10:05pm

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.

1 participant