Issue/Problem:
As it says into the tutorial too, there is the possibility to save the survey data into a DB or into metafields without explaining how or with what api, nothing at all (or i couldn’t find it…)
I tried to do so by creating a proxy connection and add to the handle of the submit a fetch to the proxy and handle all the metafield stuff in there. Just for testing purpose i only added a get to it but no hope
I followed the tutorial and it worked great for the Customer Account UI.
I created the metafields when app is being installed installed and is working absolutely fine. (this gave me power to continue )
i found this shopify:customer-account/api/2024-10/graphql.json and I tried to find out what this thing is shopify:customer-account but no luck and wanted to do the same thing for thank you page but there is no such thing
So al summed up i used this ${shop}/api/2025-01/graphql.json and it kind of worked … kind of…
Yeah and now i am back to where i have been but with more experience than before
TL:DR:
Used the logic for customer account into Thank You page
I had no luck using it but at least i created the metafields
I am back from where i started as i cannot call any mutation from thank you page
PS:
And if i simply use "shopify:admin/api/graphql.json" as i saw on some other projects on github i receive URL must be secure (HTTPS) and it does not do the call
ExtensionInteractionError:
Error in Restricted(DisclosureActivator(ForwardRef())) component event handler:
Error: URL must be secure (HTTPS)
@Andydrei I am not sure if this will help you but when I changed the [capabilities] in the .toml file to [extensions.capabilities] I was able to make a fetch call