From 71047cc2f96c12b74c8b056c4440680ead945102 Mon Sep 17 00:00:00 2001 From: Emma Hamilton Date: Tue, 11 Mar 2025 14:06:48 +1000 Subject: [PATCH] example updates --- examples/basic-graphql-yoga/index.ts | 5 ++++- examples/basic-graphql-yoga/package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/basic-graphql-yoga/index.ts b/examples/basic-graphql-yoga/index.ts index bbe5d72..8e6bde0 100644 --- a/examples/basic-graphql-yoga/index.ts +++ b/examples/basic-graphql-yoga/index.ts @@ -17,7 +17,10 @@ const Query = g.object()({ const schema = new GraphQLSchema({ query: Query }); -const yoga = createYoga({ schema }); +const yoga = createYoga({ + schema, + graphiql: { defaultQuery: `query {\n hello\n}` }, +}); const server = createServer(yoga); server.listen(4000, () => { console.info("Server is running on http://localhost:4000/graphql"); diff --git a/examples/basic-graphql-yoga/package.json b/examples/basic-graphql-yoga/package.json index 694dbdf..8d9ab3b 100644 --- a/examples/basic-graphql-yoga/package.json +++ b/examples/basic-graphql-yoga/package.json @@ -12,7 +12,7 @@ "typescript": "^5.8.2" }, "scripts": { - "dev": "tsx index.ts", + "dev": "tsx --watch index.ts", "types": "tsc" }, "repository": "https://github.com/Thinkmill/graphql-ts/tree/main/examples/basic-graphql-yoga"