We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is a query for the Magento API, used to get a shopping cart with products:
fragment SimpleProduct on SimpleProduct { sku } fragment VirtualProduct on VirtualProduct { sku } fragment DownloadableProduct on DownloadableProduct { sku } fragment ConfigurableProduct on ConfigurableProduct { sku } fragment BundleProduct on BundleProduct { sku } fragment GroupedProduct on GroupedProduct { sku } fragment CartItem on CartItemInterface { __typename ...on SimpleCartItem { product { ...Product } } ...on VirtualCartItem { product { ...Product } } ...on DownloadableCartItem { product { ...Product } } ...on ConfigurableCartItem { product { ...Product } } ...on BundleCartItem { product { ...Product } } } fragment Product on ProductInterface { __typename ... on SimpleProduct { ...SimpleProduct } ... on VirtualProduct { ...VirtualProduct } ... on DownloadableProduct { ...DownloadableProduct } ... on ConfigurableProduct { ...ConfigurableProduct } ... on BundleProduct { ...BundleProduct } ... on GroupedProduct { ...GroupedProduct } } query getCart($cartId: String!) { cart(cart_id: $cartId) { items { ...CartItem } } }
It will generate the file Fragments/Product.elm containing the following decoder:
Fragments/Product.elm
decoder : Int -> Json.Decode.Decoder (b -> b) -> Json.Decode.Decoder b
Compiling this will fail with:
The argument is: Json.Decode.Decoder (b1 -> b1) But (|>) is piping it to a function that expects: Json.Decode.Decoder (Product_Specifics -> b)
Changing it to this will make it compile and work:
decoder : Int -> Json.Decode.Decoder (Product_Specifics -> b) -> Json.Decode.Decoder b
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is a query for the Magento API, used to get a shopping cart with products:
It will generate the file
Fragments/Product.elm
containing the following decoder:Compiling this will fail with:
Changing it to this will make it compile and work:
The text was updated successfully, but these errors were encountered: