mirror of
https://github.com/jorgev259/soc_site-astro.git
synced 2025-06-29 07:57:41 +00:00
Implement register form
This commit is contained in:
parent
adeb3fd3bf
commit
cdcd71cf2a
17 changed files with 526 additions and 99 deletions
15
src/pages/api/graphql.ts
Normal file
15
src/pages/api/graphql.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import type { APIRoute } from 'astro'
|
||||
import { createYoga } from 'graphql-yoga'
|
||||
|
||||
import schema from '@/graphql/schema'
|
||||
|
||||
const { handleRequest } = createYoga({
|
||||
schema,
|
||||
graphqlEndpoint: '/api/graphql',
|
||||
fetchAPI: { Request, Response }
|
||||
})
|
||||
|
||||
export const POST: APIRoute = async (context) => {
|
||||
const { request } = context
|
||||
return handleRequest(request, context)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue