-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.ts
More file actions
53 lines (52 loc) · 1.47 KB
/
Copy pathindex.ts
File metadata and controls
53 lines (52 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { defineEventHandler } from 'nitro/h3'
export default defineEventHandler((event) => {
return `
<!DOCTYPE html>
<html>
<head>
<title>Nitro GraphQL Yoga Playground</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
margin: 0;
padding: 40px;
background-color: #f5f5f5;
}
.container {
max-width: 600px;
margin: 0 auto;
background: white;
padding: 40px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
h1 {
color: #333;
margin-bottom: 20px;
}
.link {
display: inline-block;
margin-top: 20px;
padding: 12px 24px;
background-color: #007bff;
color: white;
text-decoration: none;
border-radius: 4px;
transition: background-color 0.2s;
}
.link:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<div class="container">
<h1>Nitro GraphQL Yoga Playground</h1>
<p>Welcome to the Nitro GraphQL Yoga example application!</p>
<p>The GraphQL endpoint is available at:</p>
<a href="/api/graphql" class="link">Open GraphQL Playground →</a>
</div>
</body>
</html>
`
})