Skip to content

Commit 5ccae2e

Browse files
authored
example updates (#64)
1 parent 794e7b7 commit 5ccae2e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

examples/basic-graphql-yoga/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ const Query = g.object()({
1717

1818
const schema = new GraphQLSchema({ query: Query });
1919

20-
const yoga = createYoga({ schema });
20+
const yoga = createYoga({
21+
schema,
22+
graphiql: { defaultQuery: `query {\n hello\n}` },
23+
});
2124
const server = createServer(yoga);
2225
server.listen(4000, () => {
2326
console.info("Server is running on http://localhost:4000/graphql");

examples/basic-graphql-yoga/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"typescript": "^5.8.2"
1313
},
1414
"scripts": {
15-
"dev": "tsx index.ts",
15+
"dev": "tsx --watch index.ts",
1616
"types": "tsc"
1717
},
1818
"repository": "https://github.com/Thinkmill/graphql-ts/tree/main/examples/basic-graphql-yoga"

0 commit comments

Comments
 (0)