Expose PricePart over GraphQL #705
-
|
I added Orchard Core Commerce and used a recipe to create some products. I noticed that when I view the products in the GraphQL explorer in the admin section, the product price is only exposed in a render item on the root object. Is there a way of getting at the product's price without having to parse it out of the render item? |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 4 replies
-
|
I don't think there is anything GraphQL-specific in OrchardCore.Commerce yet. Orchard Core exposes stock content fields to GrahQL, but doesn't do anything with custom fields like the price field found in PricePart. You can expose it by implementing a GraphQL model class (like how Orchard Core exposes its stock content fields) If you decide to do that, we'd appreciate a pull request in the https://github.com/OrchardCMS/OrchardCore.Commerce repository. |
Beta Was this translation helpful? Give feedback.
-
|
This should be moved to |
Beta Was this translation helpful? Give feedback.
I don't think there is anything GraphQL-specific in OrchardCore.Commerce yet. Orchard Core exposes stock content fields to GrahQL, but doesn't do anything with custom fields like the price field found in PricePart. You can expose it by implementing a GraphQL model class (like how Orchard Core exposes its stock content fields)
If you decide to do that, we'd appreciate a pull request in the https://github.com/OrchardCMS/OrchardCore.Commerce repository.