Ho un problema nell’integrare shopify sul mio progetto in nuxt 3
Hi everyone, I am trying to connect an application of mine in nuxt 3 with shopify.
I initially created an app in shopify, and set up API Admin and Storefront API Integration.
I then installed ‘nuxt-graphql-client’ on my project and configured the nuxt.config as follows:
export default defineNuxtConfig({
devtools: { enabled: true },
colorMode: {
preference: "light",
},
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
runtimeConfig: {
public: {
"graphql-client": {
clients: {
default: {
host: process.env.SHOPIFY_DOMAIN,
token: {
name: "X-Shopify-Storefront-Access-Token",
value: process.env.SHOPIFY_STOREFRONT_TOKEN,
type: null,
},
retainToken: true,
},
},
},
},
},
css: ["~/assets/css/main.scss"],
modules: [
"@nuxt/image",
"nuxt-icon",
"nuxt-swiper",
"@nuxt/ui",
"@nuxtjs/i18n",
"nuxt-graphql-client",
],
});
I set up the .env file as follows:
SHOPIFY_DOMAIN=https://<domain>/admin/api/2024-04/graphql.json SHOPIFY_STOREFRONT_ACCESS_TOKEN=<token>
I got the token from API Credentials > Storefront API Access Token.
After starting the project it generated the following error:
Failed to load schema from https:///admin/api/2024-04/graphql.json:
What did I do wrong?
Francesco Buscicchio is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.