Skip to content

Commit

Permalink
minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
v1rtl committed Mar 23, 2021
1 parent da690bf commit 52ba983
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ type Query {
const s = serve({ port: 3000 })

for await (const req of s) {
req.url === '/graphql'
req.url.startsWith('/graphql')
? await GraphQLHTTP({
schema,
rootValue: {
hello: () => 'Hello World!'
}
},
graphiql: true
})(req)
: req.respond({
status: 404
Expand Down
1 change: 1 addition & 0 deletions examples/tinyhttp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ app
'/graphql',
GraphQLHTTP({
schema,
graphiql: true,
rootValue: {
hello: () => 'Hello World!'
}
Expand Down
5 changes: 3 additions & 2 deletions examples/vanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ type Query {
const s = serve({ port: 3000 })

for await (const req of s) {
req.url === '/graphql'
req.url.startsWith('/graphql')
? await GraphQLHTTP({
schema,
rootValue: {
hello: () => 'Hello World!'
}
},
graphiql: true
})(req)
: req.respond({
status: 404
Expand Down

0 comments on commit 52ba983

Please sign in to comment.