Skip to content

feat: add search-products method#1004

Merged
levalleux-ludo merged 12 commits intomainfrom
search-products-feature
Feb 27, 2026
Merged

feat: add search-products method#1004
levalleux-ludo merged 12 commits intomainfrom
search-products-feature

Conversation

@levalleux-ludo
Copy link
Member

@levalleux-ludo levalleux-ludo commented Feb 27, 2026

Description

This PR adds a product search functionality to the core SDK, allowing users to search for products by keywords across title, description, and tags fields. The implementation includes a new SearchMixin class, GraphQL query definitions, a command-line script for testing, and comprehensive end-to-end tests.

Changes:

Added searchProducts method to CoreSDK that searches products by keywords with automatic filtering for valid, non-voided products
Created a command-line script (search-products) to enable searching products from the terminal
Added comprehensive e2e tests covering various search scenarios including single keyword, multiple keywords, and searches across different metadata fields

How to test

new e2e tests have been added

Copilot AI review requested due to automatic review settings February 27, 2026 12:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a product search functionality to the core SDK, allowing users to search for products by keywords across title, description, and tags fields. The implementation includes a new SearchMixin class, GraphQL query definitions, a command-line script for testing, and comprehensive end-to-end tests.

Changes:

  • Added searchProducts method to CoreSDK that searches products by keywords with automatic filtering for valid, non-voided products
  • Created a command-line script (search-products) to enable searching products from the terminal
  • Added comprehensive e2e tests covering various search scenarios including single keyword, multiple keywords, and searches across different metadata fields

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
scripts/search-products.ts Command-line script for searching products by keywords with environment and config options
packages/core-sdk/src/subgraph.ts Auto-generated TypeScript types and SDK methods for the searchProducts GraphQL query
packages/core-sdk/src/search/subgraph.ts Subgraph wrapper function that executes the search query and returns product results
packages/core-sdk/src/search/queries.graphql GraphQL query and fragment definitions for searching products with various filter and pagination options
packages/core-sdk/src/search/mixin.ts SearchMixin class implementing the searchProducts method with keyword filtering across title, description, and tags
packages/core-sdk/src/core-sdk.ts Integration of SearchMixin into CoreSDK via mixin pattern
package.json Added npm script "search-products" for running the search script
e2e/tests/productV1.test.ts Comprehensive test suite with 7 test cases covering different search scenarios

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 94.11765% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.94%. Comparing base (822808b) to head (13e086d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/core-sdk/src/search/index.ts 0.00% 1 Missing ⚠️
packages/core-sdk/src/search/mixin.ts 95.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1004      +/-   ##
==========================================
+ Coverage   90.93%   90.94%   +0.01%     
==========================================
  Files         176      179       +3     
  Lines        7247     7281      +34     
  Branches     1355     1366      +11     
==========================================
+ Hits         6590     6622      +32     
- Misses        657      659       +2     
Flag Coverage Δ
common 92.59% <ø> (ø)
core-sdk 56.51% <29.41%> (-0.15%) ⬇️
e2e 85.76% <96.96%> (+0.05%) ⬆️
eth-connect-sdk 95.06% <ø> (ø)
ethers-sdk 74.45% <ø> (ø)
ipfs-storage 91.75% <ø> (ø)
metadata 94.70% <ø> (ø)
unittests 60.80% <29.41%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

levalleux-ludo and others added 4 commits February 27, 2026 16:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@levalleux-ludo levalleux-ludo merged commit 030f8f3 into main Feb 27, 2026
11 of 13 checks passed
@levalleux-ludo levalleux-ludo deleted the search-products-feature branch February 27, 2026 17:50
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