Skip to content

Commit 40ce8c0

Browse files
committed
fix: api path
1 parent 9505785 commit 40ce8c0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ npm install apollo-server-integration-svelte
1515

1616
## Getting started
1717

18-
1. Create a new file named `+server.ts` inside the `src/routes/graphql` directory of your SvelteKit project.
18+
1. Create a new file named `+server.ts` inside the `src/routes/api/graphql` directory of your SvelteKit project.
1919

2020
2. Import the necessary modules and define your GraphQL schema and resolvers:
2121

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "apollo-server-integration-svelte",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"scripts": {
55
"dev": "vite dev",
66
"build": "vite build && pnpm run package",

src/lib/isSvelteApiRequest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { RequestEvent } from '@sveltejs/kit';
22

33
const isSvelteApiRequest = (event: RequestEvent): boolean => {
4-
return event.url.pathname.startsWith('/graphql');
4+
return event.url.pathname.startsWith('/api');
55
};
66

77
export { isSvelteApiRequest };

0 commit comments

Comments
 (0)