pwa-studio
pwa-studio copied to clipboard
How to parse JSON to index.html?
I can get data from GraphQL in upward..yml , but It's writing
===> Hellow ===> {{cmsPageResult > json}}
I want to print the JSON data to {{messageContent}}
veniaAppShell:
resolver: inline
inline:
status:
resolver: inline
inline: 200
headers:
resolver: inline
inline:
content-type:
inline: text/html
cache-control:
inline: s-maxage=60
body:
resolver: template
engine: mustache
provide:
pageType: veniaPageType.data
pageTypeNonce: veniaPageTypeNonce.nonce
webpackChunks: veniaWebpackChunks.scripts
**textHellow:
resolver: inline
inline: "Hellow"
messageContent:
resolver: inline
inline: '{{cmsPageResult > json}}' # ???? I want cmsPageResult to show as JSON in index.html**
template:
resolver: file
file:
resolver: inline
inline: './index.html'
cmsPageResult:
url:
resolver: inline
inline: "DOMAIN/graphql"
query:
resolver: inline
inline: |
query {
storeConfig {
header_logo_src
logo_alt
logo_height
logo_width
store_code
}
}
<!DOCTYPE html>
<html>
<head>
</head>
<body class="bg-body text-base text-colorDefault overflow-x-hidden">
**===> {{textHellow}}
===> {{messageContent}}**
</body>
</html>
Hi @nickcarterney. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel.
@magento-admin @magently I am working on this
@magento I am working on this
Hi @nickcarterney! :wave:
Thank you for collaboration. Only members of Community Contributors Team are allowed to be assigned to the issue. Please use @magento add to contributors team command to join Contributors team.
@magento add to contributors team
Hi @nickcarterney! :wave: Thank you for joining. Please accept team invitation :point_right: here :point_left: and add your comment one more time.
Can anyone help me? I cannot find any documents about this issue :(
@adobe export issue to JIRA project PWA as Bug
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/PWA-3633 is successfully created for this GitHub issue.