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

Function loader

sample-apps/delivery-customizations/app/routes/app.tsx:9–13  ·  view source on GitHub ↗
({ request }: LoaderFunctionArgs)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected