Repository navigation
chore: adds profile query basic structure - #2744
Merged
Merged
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
hellofanny
marked this pull request as ready for review
March 24, 2025 22:30
hellofanny
requested review from
lucasfp13,
pedromtec,
renatamottam and
renatomaurovtex
and removed request for
a team,
renatamottam and
renatomaurovtex
March 24, 2025 22:30
| clients: { commerce }, | ||
| } = ctx | ||
|
|
||
| const addresses = await commerce.profile.addresses(id) |
Member
There was a problem hiding this comment.
Do you think we should handle errors (try catch) if id didn't exist, for example? or did the Profile API already do?
Contributor
There was a problem hiding this comment.
id here will always exist ensured by the query property that set it as required (see QueryProfileArgs input type). If the param is not sent, the GraphQL layer will probably throw an error before the execution, @hellofanny you can just reproduce this scenario to validate the behavior.
Contributor
Author
lucasfp13
approved these changes
Mar 25, 2025
eduardoformiga
approved these changes
Mar 25, 2025
pedromtec
approved these changes
Mar 25, 2025
matheusps
approved these changes
Mar 25, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What's the purpose of this pull request?
We will need to update the faststore/api with
profile.To avoid conflicts and potential issues, since multiple feature branches will be using the same core, I'm extracting part of the logic introduced in #2739 into the main branch.
How it works?
Adds profile's type and profile to query.
How to test it?
The easiest way to test might be running the faststore/api and faststore/core
profile