Unverified Commit 00d7a35e authored by Arda TANRIKULU's avatar Arda TANRIKULU Committed by GitHub

Use the stable GraphQL Yoga v3 in the GraphQL example (#44488)

Use the stable GraphQL Yoga v3 in the GraphQL example, and also disable body parser for fully functionality as in GraphQL Yoga's recipe for Next.js;
https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-nextjs#exampleCo-authored-by: 's avatarJJ Kasper <22380829+ijjk@users.noreply.github.com>
parent 3dfb85d0
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"start": "next start" "start": "next start"
}, },
"dependencies": { "dependencies": {
"graphql-yoga": "three", "graphql-yoga": "^3.2.1",
"graphql": "^16.5.0", "graphql": "^16.5.0",
"next": "latest", "next": "latest",
"react": "^18.2.0", "react": "^18.2.0",
......
...@@ -22,6 +22,13 @@ const schema = createSchema({ ...@@ -22,6 +22,13 @@ const schema = createSchema({
resolvers, resolvers,
}) })
export const config = {
api: {
// Disable body parsing (required for file uploads)
bodyParser: false,
},
}
export default createYoga({ export default createYoga({
schema, schema,
// Needed to be defined explicitly because our endpoint lives at a different path other than `/graphql` // Needed to be defined explicitly because our endpoint lives at a different path other than `/graphql`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment