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

docs: fix incorrect RequestContext serialization method #3365

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Ryrahul
Copy link

@Ryrahul Ryrahul commented Feb 13, 2025

Description

Update documentation for RequestContext serialization to correctly use ctx.serialize() instead of RequestContext.serialize(ctx). This change resolves an issue where the documentation incorrectly referenced a static method that does not exist, leading to confusion.

Breaking changes

N/A

Screenshots

N/A

Checklist

📌 Always:

  • I have set a clear title
  • My PR is small and contains a single feature
  • 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 Feb 13, 2025

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

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Feb 14, 2025 3:22pm

Copy link
Contributor

github-actions bot commented Feb 13, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Ryrahul
Copy link
Author

Ryrahul commented Feb 13, 2025

I have read the CLA Document and I hereby sign the CLA

Copy link
Member

@michaelbromley michaelbromley left a comment

Choose a reason for hiding this comment

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

Thanks! There's a small part that needs fixing.

@@ -326,7 +326,7 @@ export class ProductVideoPlugin {}

Sometimes you need to pass the [RequestContext object](/reference/typescript-api/request/request-context) to the `process` function of a job, since `ctx` is required by many Vendure
service methods that you may be using inside your `process` function. However, the `RequestContext` object itself is not serializable,
so it cannot be passed directly to the `JobQueue.add()` method. Instead, you can serialize the `RequestContext` using the [`RequestContext.serialize()`
so it cannot be passed directly to the `JobQueue.add()` method. Instead, you can serialize the `RequestContext` using the ctx.serialize() method `
Copy link
Member

Choose a reason for hiding this comment

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

This part looks incorrect. The link is not correctly formatted and the word "method" is repeated.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for the feedback! I've made the changes. If any further adjustments are needed, please let me know. Thanks again!

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.

2 participants