f53ee47b73
There is a bug in the cms-wordpress example due to a Wordpress plugin dependency. After running `npm install`, then either `npm run dev` or `npm run build`, the following errors appear in the console: ```shell > cms-wordpress@1.0.0 dev /Users/jplew/Sites/projects/next.js/examples/cms-wordpress > next ready - started server on http://localhost:3000 info - Loaded env from /Users/jplew/Sites/projects/next.js/examples/cms-wordpress/.env.local event - compiled successfully event - build page: / wait - compiling... event - build page: /next/dist/pages/_error event - compiled successfully [ { message: 'Cannot query field "name" on type "NodeWithAuthorToUserConnectionEdge". Did you mean "node"?', extensions: { category: 'graphql' }, locations: [ [Object] ] }, { message: 'Cannot query field "firstName" on type "NodeWithAuthorToUserConnectionEdge".', extensions: { category: 'graphql' }, locations: [ [Object] ] }, { message: 'Cannot query field "lastName" on type "NodeWithAuthorToUserConnectionEdge".', extensions: { category: 'graphql' }, locations: [ [Object] ] }, { message: 'Cannot query field "avatar" on type "NodeWithAuthorToUserConnectionEdge".', extensions: { category: 'graphql' }, locations: [ [Object] ] } ] Error: Failed to fetch API at fetchAPI (webpack-internal:///./lib/api.js:31:11) ``` The reason for this is `wp-graphql` released version v0.10.0 ten days ago which introduced a number of breaking changes (https://github.com/wp-graphql/wp-graphql/releases/tag/v0.10.0). Specifically, this is the change that breaks the current example: > - One to One relationships are now nested. For example post.author and post.featuredImage now return an edge/node instead of the node directly. More info about this change can be found here: https://github.com/wp-graphql/wp-graphql/issues/347#issuecomment-639071772 After my changes, `npm run dev` and `npm run build` succeed without errors. |
||
---|---|---|
.. | ||
alert.js | ||
avatar.js | ||
categories.js | ||
container.js | ||
cover-image.js | ||
date.js | ||
footer.js | ||
header.js | ||
hero-post.js | ||
intro.js | ||
layout.js | ||
meta.js | ||
more-stories.js | ||
post-body.js | ||
post-body.module.css | ||
post-header.js | ||
post-preview.js | ||
post-title.js | ||
section-separator.js | ||
tags.js |