- Remix (TypeScript) + Polaris, official Shopify app template - Prisma multi-tenant schema (Settings, ExclusionRule, WithdrawalRequest, AuditLog, WebhookEvent) on Postgres - Mandatory GDPR compliance webhooks (data_request, redact, shop/redact) + HMAC handlers - API version pinned 2026-04, scopes read_orders/read_products - Fly deploy config; two-env strategy (custom now, public later) - Dev setup: shopify.web.toml + Vite allowedHosts for tunnels - Docs: PLAN.md, ANALISI-REQUISITI-LEGALI.md (Art. 54-bis compliance) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mv83a29B4eFv5ixoj6PoE1
46 lines
1.0 KiB
TypeScript
46 lines
1.0 KiB
TypeScript
import fs from "fs";
|
|
import { ApiVersion } from "@shopify/shopify-api";
|
|
import { shopifyApiProject, ApiType } from "@shopify/api-codegen-preset";
|
|
import type { IGraphQLConfig } from "graphql-config";
|
|
|
|
function getConfig() {
|
|
const config: IGraphQLConfig = {
|
|
projects: {
|
|
default: shopifyApiProject({
|
|
apiType: ApiType.Admin,
|
|
apiVersion: ApiVersion.July25,
|
|
documents: [
|
|
"./app/**/*.{js,ts,jsx,tsx}",
|
|
"./app/.server/**/*.{js,ts,jsx,tsx}",
|
|
],
|
|
outputDir: "./app/types",
|
|
}),
|
|
},
|
|
};
|
|
|
|
let extensions: string[] = [];
|
|
try {
|
|
extensions = fs.readdirSync("./extensions");
|
|
} catch {
|
|
// ignore if no extensions
|
|
}
|
|
|
|
for (const entry of extensions) {
|
|
const extensionPath = `./extensions/${entry}`;
|
|
const schema = `${extensionPath}/schema.graphql`;
|
|
if (!fs.existsSync(schema)) {
|
|
continue;
|
|
}
|
|
config.projects[entry] = {
|
|
schema,
|
|
documents: [`${extensionPath}/**/*.graphql`],
|
|
};
|
|
}
|
|
|
|
return config;
|
|
}
|
|
|
|
const config = getConfig();
|
|
|
|
export default config;
|