medusajs / medusajs/examples

Not able to create a review via terminal

Open
#69 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
282
Forks
63
PR merge metrics
No merged PRs in 30d

Description

I implemented the code according to the tutorial in the doucmenation and after step 5 I cannot create a review via the terminal. The create-review.ts workflow always throws the following error:

Product: Primary key(s) [id, handle] not found in filters
{
message: 'Product: Primary key(s) [id, handle] not found in filters',
name: 'Error',
stack: 'Error: Product: Primary key(s) [id, handle] not found in filters\n' + ...
\src\workflows\create-review.ts: [create-review -> use-query-graph-step (invoke)]',
__isMedusaError: true,
type: 'not_found',
code: undefined,
date: 2025-08-01T09:18:12.768Z
}

However the product_id and handle are correct since I retrieved them via the terminal. I also added the handle variable to the worklfows, but it still says that the product cannot be found. I also cleaned the project and also installed the dependicies new, run migrations and build process mulitple times, but the issue stills persists. I am not sure anymore where the issue could be. Thanks for the help.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing tutorial step 5 and inspect src/workflows/create-review.ts, especially the use-query-graph-step invocation. Trace how product_id and handle reach the workflow and compare them with the reported primary-key error. Done means the review can be created through the terminal without the Product key error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.