Hello,
I am using https://github.com/Shopify/shopify-demo-app-node-react and I was wondering where is the install data persisted in the app? or is It even necessary?
Regards,
Robert
Persistence of install data in the Shopify Node/React demo app was clarified: the app does not automatically manage long-term storage for installation state. The key outcome is that the app itself is responsible for storing data such as the shop origin and access token.
The original question was effectively resolved with the conclusion that installation details should be persisted by the app, typically in a database, while other admin-side data can be stored in private metafields.
A later update introduced a new unresolved issue: when trying to upload images via the GraphQL stagedUploadsCreate mutation, an âaccess deniedâ error occurred. As a workaround, uploading the image as a theme asset was being considered, though that would limit availability to the currently active theme.
Hello,
I am using https://github.com/Shopify/shopify-demo-app-node-react and I was wondering where is the install data persisted in the app? or is It even necessary?
Regards,
Robert
Hello,
Thank you for your response, but that does not answer my question. I was aware of the fact that databases might be needed but I am not sure of the fact that they are required.
Will the node-react app keep track of active installation without the database? or is it stored in memory and will be lost when app restarts (doesnât seem so from what I checked).
Regards,
Robert
Hi @RobertDev
Hope youâre having a great day!
I was aware of the fact that databases might be needed but I am not sure of the fact that they are required.
Databases are not required. It all depends on your needs and what you want to design. You may want to add a database to your app or depending on what data you are storing you could use metafields.
Merchants and other apps can retrieve and edit the data thatâs stored in metafields from the Shopify admin. If you want to use metafields to store data, but you donât want merchants or other apps to access that data, then you can use private metafields.
Will the node-react app keep track of active installation without the database? or is it stored in memory and will be lost when app restarts (doesnât seem so from what I checked).
If you want to store data, like shop origin or accessToken and other custom data, you should use a custom database.
To summarizing, Your app is responsible for storing its own information.
If you found this comment useful, hit the âLikeâ and âAccepted solutionâ buttons.
Hello,
After a couple of threads read I came to the conclusion that a database will be required to store the initial installation shop and accessToken.
Other data related to my admin backend I store in private metafields as you outlined in your response!
Now I am at the part of storing images with StagedUploadsCreate mutation but I get a âStagedUploadsCreate access deniedâ for some odd reason. To bypass this I will upload the image as a theme asset I think and it will be available for the current active theme unfortunately⌠because StagedUploadsCreate is denied for some reason.
![]()
Thank you for your time and effort in responding to my question!
Regards,
Robert