MCPcopy Create free account
hub / github.com/Shopify/function-examples / loader

Function loader

sample-apps/payment-customizations/app/routes/app.jsx:8–12  ·  view source on GitHub ↗
({ request })

Source from the content-addressed store, hash-verified

6import { authenticate } from "../shopify.server.js";
7
8export const loader = async ({ request }) => {
9 await authenticate.admin(request);
10
11 return { apiKey: process.env.SHOPIFY_API_KEY || "" };
12};
13
14export default function App() {
15 const { apiKey } = useLoaderData();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected