Updating API version

I have a custom app with a few extensions, and I’m in need of updating the api version.

I have seen this: About Function input and output

So I update the api_version in my extension dir in my app.

When I then run shopify app function schema from my app root dir (not the extension dir), it asks me which function, I then select my function after which it asks me

‘Create this project as a new app on Shopify?’
‘Yes, create as a new app’
‘No, connect to an existing app’

Obviously I’m trying to do this for my existing app… however - will it break anything? Does this ‘connect to existing app’ just mess with local files, or already changes something on the live app? Or does this change only happen once I deploy the whole app?

The app is running on a live site so I can’t risk it breaking anything there.

I could probably test with a different app and test clone, however in order to save some time, someone might have the answer.

Thanks

Hi @d_or_1015,

If your app is already linked in the shopify.app.toml, I’m surprised that you are being prompted for this question. Does this happen if you run the command from the function path?

Does this ‘connect to existing app’ just mess with local files, or already changes something on the live app?

This will not do anything to your live app, unless you run app dev or app deploy after. However I would recommend creating a separate development copy of your app for testing the API version update, which would make it safe to run app dev.

-Nick

1 Like

Hi @NickWesselman

Thanks for your reply - that helped as I realised this was in a directory where the app wasn’t connected yet!

I’m aware of the dev copy, which I did start on but it’s tricky/time consuming to set up an exact same test environment for this.

which would make it safe to run app dev

Are you saying running app dev has an influence on the live instances? I would have assumed only app deploy would?

Yes, if you run app dev on live app and accidentally choose to update the App URL, it will replace your live app’s URL with the Cloudflare Tunnel URL, breaking your live app.

To be safe, never run app dev on your live app, you anyway will not be able to test it locally without breaking it in production.

Ah yeah that makes sense - though my app only has extensions, so not an actual used app url.