From c29af1dbbfee45c96ebcd890cb39967bdd00a79e Mon Sep 17 00:00:00 2001 From: Benjamin Tamasi Date: Fri, 4 Aug 2023 14:00:22 +0200 Subject: [PATCH] Fix integration-with-sveltekit.mdx (#2927) Updates the documentation to correctly show the needed values to make this work on SvelteKit --- .../pages/docs/integrations/integration-with-sveltekit.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/src/pages/docs/integrations/integration-with-sveltekit.mdx b/website/src/pages/docs/integrations/integration-with-sveltekit.mdx index 09ce7d2c7b..7ac638f510 100644 --- a/website/src/pages/docs/integrations/integration-with-sveltekit.mdx +++ b/website/src/pages/docs/integrations/integration-with-sveltekit.mdx @@ -24,9 +24,9 @@ npm i graphql-yoga graphql ### Create your graphql endpoint -Create the file `src/routes/api/graphql.ts`: +Create the file `src/routes/api/graphql/+server.ts`: -```ts filename="src/routes/api/graphql.ts" +```ts filename="src/routes/api/graphql/+server.ts" import { createSchema, createYoga } from 'graphql-yoga' import type { RequestEvent } from '@sveltejs/kit' @@ -50,7 +50,7 @@ const yogaApp = createYoga({ fetchAPI: globalThis }) -export { yogaApp as get, yogaApp as post } +export { yogaApp as GET, yogaApp as POST } ``` > **Simple example** on our GitHub repository