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

chore: enhance-customquery-type #6928

Merged
merged 3 commits into from Jul 11, 2023
Merged

Conversation

jacobfogolyan
Copy link
Contributor

@jacobfogolyan jacobfogolyan commented Jun 14, 2023

IN-3334

Description

Comparing examples on Vue Storefront docs on using custom Queries, when sending a customQuery with metadata, the type only allows Record<string, string> However in docs it is explained that you can send metadata as an object which this type doesn't allow.

What it currently supports

      getStores({
        customQuery: {
          getStoresData: 'set-store-data',
          metadata: 'entry1,entry2',
        },
      })

What is needed

     getStores({
        customQuery: {
          getStoresData: 'set-store-data',
          metadata: {
            key1: 'entry1',
            key22: 'entry2',
          },
        },
      })

If this change isn't made, then we would have to split the string by , rather than having metadata.objectKey.

How Has This Been Tested?

This was tested on an existing codebase

Checklist:

  • I have read the CONTRIBUTING document.

Changelog

  • v2 and mentioned all breaking changes in the public API.
  • I have documented all new public APIs and made changes to existing docs mentioning the parts I've changed so they're up to date.

Tests

  • I have written test cases for my code
  • I have tested my Pull Request on production build and (to my knowledge) it works without any issues
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Code standards

Docs

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@github-actions github-actions bot added the core label Jun 14, 2023
Copy link
Collaborator

@WojtekTheWebDev WojtekTheWebDev left a comment

Choose a reason for hiding this comment

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

@jacobfogolyan to have it applied, please also bump the version in package.json. I can take care of the release after merging.

@WojtekTheWebDev WojtekTheWebDev merged commit 925d3cc into main Jul 11, 2023
3 checks passed
@WojtekTheWebDev WojtekTheWebDev deleted the chore/enhance-customquery-type branch July 11, 2023 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants