-
Notifications
You must be signed in to change notification settings - Fork 22
Improvement: Add support for includeClosed and assignedLocationId filters in get#FulfillmentOrdersByOrderId #188
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
Open
puru-khedre
wants to merge
4
commits into
hotwax:main
Choose a base branch
from
puru-khedre:improve-get-fulfillment-order
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2ac150d
Update the query template and upgrade data
puru-khedre 1ec7808
Add support for filters as service input params
puru-khedre 3de8106
Merge branch 'main' into improve-get-fulfillment-order
puru-khedre af7d22f
Support for excludedStatus paramenter for filtering
puru-khedre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,51 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <entity-facade-xml type="ext-upgrade"> | ||
| <moqui.resource.DbResource filename="FulfillmentOrdersByOrderIdQuery.ftl" isFile="Y" resourceId="FulfillmentOrdersByOrderIdQuery" | ||
| parentResourceId="GraphQL"> | ||
| <file mimeType="text/html" versionName="01" rootVersionName="01"> | ||
| <fileData> | ||
| <![CDATA[<#ftl output_format="HTML"> | ||
| <@compress single_line=true> | ||
| <#assign query = ""/> | ||
| <#assign excludedQuery = ""> | ||
| <#if excludedStatus?has_content> | ||
| <#assign parts = []> | ||
| <#list excludedStatus as st> | ||
| <#assign parts = parts + ["-status:${st}"]> | ||
| </#list> | ||
| <#if parts?size > 0> | ||
| <#assign excludedQuery = parts?join(" AND ")> | ||
| </#if> | ||
| <#assign query = "${excludedQuery}"/> | ||
| </#if> | ||
| <#if assignedLocationId?has_content> | ||
| <#assign query = "${query} assigned_location_id:${assignedLocationId}"/> | ||
| </#if> | ||
| query{ | ||
| node(id: "${shopifyOrderId}") { | ||
| id | ||
| ... on | ||
| Order { | ||
| id | ||
| name | ||
| fulfillmentOrders (first: 10<#if cursor?has_content>, after: "${cursor}"</#if>, query: "${query}") { | ||
| edges { | ||
| node { | ||
| id | ||
| } | ||
| } | ||
| pageInfo{ | ||
| endCursor | ||
| hasNextPage | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| </@compress>]]> | ||
| </fileData> | ||
| <histories versionName="01" previousVersionName="01"/> | ||
| </file> | ||
| </moqui.resource.DbResource> | ||
|
|
||
| </entity-facade-xml> |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we exclude more than one status ?
excludeStatus(List)
If more than one status can be excluded, then name the variable excludeStatusList else excludeStatus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shopify supports multiple conditions,
but it does not support operators like
inornot-in.If we want to accept a list excluded status,
then we’ll need to join it using the
ORorANDoperator.Example:
Suppose the excluded list has OPEN and CLOSED statuses.
In that case, we need to prepare the query as:
query: "-status:OPEN AND -status:CLOSED"Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that, instead of being tied to just one status, having an
excludeStatuslist would allow for better handling.