Working on an app, and this was all working two days ago, but today, doing the shopify app dev
everything seems normal, and then all graphql queries from the admin extension (product list in this case) return 401.
The first returns {error: "Unable to retrieve token"}
and the rest just return UNAUTHORIZED
.
Then closing it and 50% of the time I have to log back in.
code is basically
const { query } = useApi(TARGET);
// ..
await query(GRAPHQLSTRING, VARIABLES)
So not much of my own code gets in the way. It’s directly using the query provided by @shopify/ui-extensions-react/admin
to do this.
I’ve reinstalled (and tried updating and downloaded) the shopify api and packages. uninstalled the app and reinstalled it. Deployed it. Deleted the env and tried again. Basically clean, but its the same every time. Same exact code…
I can’t find a single reference this this error the whole of the internet.