Better custom cart fragment typing #2416
theocerutti
started this conversation in
Ideas + Feature Requests
Replies: 3 comments 1 reply
|
I agree this is a valid feature request. I've create an issue to get this officially in our backlog |
0 replies
|
We are also facing this issue. Thanks for raising it @theocerutti |
0 replies
|
Is there any news from this? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello,
When we create a cart with a custom
CART_QUERY_FRAGMENTit creates an incorrect ts typing.Actually, even with your
DEFAULT_CART_QUERY_FRAGMENTthe typing is not correct.If we have to modify the behavior of the cart it's really annoying since we have to override almost every cart types and that's because of almost one big issue.
So if we create a cart with custom query:
Then theses types:
should be:
Indeed we shouldn't have
Cartas type but the real queried fragment:CustomCartApiQueryFragmentin this case.also
CartGetPropsshould allow to add more custom fields since we could add parameter to cart query fragment:it would be nice to have a dynamic
CartGetProps: we could "read" the custom query fragment and add variable type dynamically toCartGetProps.otherwise just add a
extraQueryVariablesprop:All reactions