diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index 578627a989..3f5e98e6cf 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -10,6 +10,7 @@ }, "dependencies": { "@graphql-yoga/node": "0.1.0-alpha.3", + "@types/react": "17.0.38", "graphql": "^16.1.0", "next": "12.0.7", "react": "17.0.2", diff --git a/examples/nextjs/pages/api/graphql.ts b/examples/nextjs/pages/api/graphql.ts index 2fc90ffd6c..af187c3585 100644 --- a/examples/nextjs/pages/api/graphql.ts +++ b/examples/nextjs/pages/api/graphql.ts @@ -2,10 +2,11 @@ import { createServer } from '@graphql-yoga/node' const server = createServer({ - typeDefs: 'type Query {hello: String!}', - resolvers: { Query: { hello: () => 'Hello World' } }, cors: false, endpoint: '/api/graphql', + logging: { + prettyLog: false, + }, }) export const config = { diff --git a/yarn.lock b/yarn.lock index da9fdc0e96..9f42b88b63 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5389,7 +5389,7 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:*, @types/react@npm:^17.0.15, @types/react@npm:^17.0.37": +"@types/react@npm:*, @types/react@npm:17.0.38, @types/react@npm:^17.0.15, @types/react@npm:^17.0.37": version: 17.0.38 resolution: "@types/react@npm:17.0.38" dependencies: @@ -14670,6 +14670,7 @@ __metadata: resolution: "nextjs@workspace:examples/nextjs" dependencies: "@graphql-yoga/node": 0.1.0-alpha.3 + "@types/react": 17.0.38 eslint: 8.4.1 eslint-config-next: 12.0.7 graphql: ^16.1.0