From 142f1a28c04ebe5fbec4757393355b0434303ede Mon Sep 17 00:00:00 2001 From: Jayden Seric Date: Tue, 25 Feb 2020 18:01:21 +1100 Subject: [PATCH] Remove Head.rewind() in withGraphQLApp. This has apparently been unnecessary since next@8.0.0-canary.7: https://github.com/zeit/next.js/issues/9326#issuecomment-590702751 --- changelog.md | 1 + package.json | 1 - src/universal/withGraphQLApp.mjs | 3 --- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index 1db6758..9f2ae05 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,7 @@ - Removed the now redundant [`eslint-plugin-import-order-alphabetical`](https://npm.im/eslint-plugin-import-order-alphabetical) dev dependency. - Stop using [`husky`](https://npm.im/husky) and [`lint-staged`](https://npm.im/lint-staged). - Use strict mode for scripts. +- Removed the [`next`](https://npm.im/next) dev dependency and `Head.rewind()` in `withGraphQLApp`, as this has [apparently been unnecessary since `next@8.0.0-canary.7`](https://github.com/zeit/next.js/issues/9326#issuecomment-590702751). ## 5.1.0 diff --git a/package.json b/package.json index 590d449..23af72d 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ "eslint-plugin-react-hooks": "^2.4.0", "graphql-react": "^9.1.0", "jsdoc-md": "^5.0.1", - "next": "^9.2.2", "prettier": "^1.18.2", "react": "^16.8.6" }, diff --git a/src/universal/withGraphQLApp.mjs b/src/universal/withGraphQLApp.mjs index 442e907..d448c84 100644 --- a/src/universal/withGraphQLApp.mjs +++ b/src/universal/withGraphQLApp.mjs @@ -4,7 +4,6 @@ import { ssr } from 'graphql-react/server' // pointing to an empty decoy for the browser bundle. // eslint-disable-next-line node/no-missing-import import { LinkHeader } from 'next-graphql-react/server/LinkHeader' -import Head from 'next/head' import React from 'react' /** @@ -127,8 +126,6 @@ export const withGraphQLApp = App => ssr(graphql, ) .catch(console.error) .then(() => { - Head.rewind() - const responseLinkHeader = new LinkHeader( // Might be undefined. context.ctx.res.getHeader('Link')