Hi Josh Thanks for the info - I'll keep an eye out for the shop metafields being added to the GraphQl API in the future. I'm intending to release this app publicly when it's finished. Do you have any other suggestions for storing an access token without employing a database, or is this the recommended route for now? Thanks
... View more
Hi, I'm new to Shopify and have been creating an app to learn the ropes. I'm having trouble with something that I feel should be straightforward, so I'm hoping someone with a bit more experience will be able to tell me where I'm going wrong. My app is built using React/Next/Apollo/GraphQL and I'm trying to save a metafield that holds a small amount of configuration data onto the store. From what I've been able to tell, this isn't possible via the GraphQL API. It looks as if you're able to save metafields onto products and other resources by doing this when you create/update them - but theres no way to mutate metafields on the store directly? I tried going down the route of using the REST API for this part of the app, and seemed to be hitting one problem after another in terms of authenticating. CORS, access tokens, etc. I've reached the point where it seems as though I have to spin up a database to store the access token when the app is installed, create a custom backend function to proxy the REST request, retrieve the access token from the database within this function, use this in order to send an authenticated request to the REST API, then finally save the metafield data. This seems a bit long winded and is making me think I must be missing an easier way?
... View more