File tree 3 files changed +3
-3
lines changed
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ npm install apollo-server-integration-svelte
15
15
16
16
## Getting started
17
17
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.
19
19
20
20
2 . Import the necessary modules and define your GraphQL schema and resolvers:
21
21
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " apollo-server-integration-svelte" ,
3
- "version" : " 0.0.5 " ,
3
+ "version" : " 0.0.6 " ,
4
4
"scripts" : {
5
5
"dev" : " vite dev" ,
6
6
"build" : " vite build && pnpm run package" ,
Original file line number Diff line number Diff line change 1
1
import type { RequestEvent } from '@sveltejs/kit' ;
2
2
3
3
const isSvelteApiRequest = ( event : RequestEvent ) : boolean => {
4
- return event . url . pathname . startsWith ( '/graphql ' ) ;
4
+ return event . url . pathname . startsWith ( '/api ' ) ;
5
5
} ;
6
6
7
7
export { isSvelteApiRequest } ;
You can’t perform that action at this time.
0 commit comments