Skip to content

Commit

Permalink
Restore accidentially removed parts in GraphQL Yoga recipe (dotansimh…
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan authored Jan 24, 2023
1 parent 566f1fe commit 6b1d852
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions website/src/pages/docs/getting-started/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,14 @@ import { createServer } from 'node:http'
import { createYoga, createSchema } from 'graphql-yoga'
import { Resolvers } from './resolvers-types'

const typeDefs = readFileSync('./schema.graphql', 'utf8')

const resolvers: Resolvers = {
Query: {
// typed resolvers!
}
}

const schema = createSchema({ typeDefs, resolvers })
const yoga = createYoga({ schema })
const server = createServer(yoga)
Expand Down

0 comments on commit 6b1d852

Please sign in to comment.