You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.
First off thanks for your work on this awesome plugin! I got the starter site working and love to see the auto-rebuilds after WP content changes.
I'm attempting to use gatsby-source-wordpress-experimental on a site that has 300+ MediaItems of types .jpg, .png, .pdf, .docx, .wmv .pptx, .mp4, .bmp.
Details:
Using "gatsby-source-wordpress-experimental": "^0.8.6"
plugin entry in gatsby-config.js (it is largely copy/pasta from the starter site):
{resolve: `gatsby-source-wordpress-experimental`,options: {html: {useGatsbyImage: true,},url: process.env.GATSBY_GRAPHQL_API_URL,protocol: `https`,hostingWPCOM: false,// Flip on for debuggingverboseOutput: true,normalizer: ({ entities })=>entities.map(entity=>transformSlug(entity)),verbose: true,schema: {queryDepth: 5,typePrefix: `Wp`,timeout: 30000,perPage: 10,},develop: {nodeUpdateInterval: 10000,hardCacheMediaFiles: false,},production: {hardCacheMediaFiles: false,},debug: {// these settings are all the defaults,// remove them if you'd likegraphql: {showQueryOnError: false,showQueryVarsOnError: true,copyQueryOnError: true,panicOnError: true,// a critical error is a WPGraphQL query that returns an error and no response data. Currently WPGQL will error if we try to access private posts so if this is false it returns a lot of irrelevant errors.onlyReportCriticalErrors: false,},},// fields can be excluded globally.// this example is for wp-graphql-gutenberg.// since we can get block data on the `block` field// we don't need these fieldsexcludeFieldNames: [`blocksJSON`,`saveContent`],type: {Post: {limit:
process.env.NODE_ENV===`development`
? // Lets just pull 50 posts in development to make it easy on ourselves.10
: // and we don't actually need more than 5000 in production for this particular site5000,},// this shows how to exclude entire types from the schema// these examples are for wp-graphql-gutenbergCoreParagraphBlockAttributes: {exclude: true,},CoreParagraphBlockAttributesV2: {exclude: true,},CorePullquoteBlockAttributes: {exclude: true,},MenuItem: {exclude: true,},},},},
Attempting to run gatsby develop yields following output:
evannichols:_dev/lead-to-read ‹wp-experimental*›$ gad
success open and validate gatsby-configs - 0.105s
success load plugins - 1.432s
success onPreInit - 0.012s
success initialize cache - 0.047s
success copy gatsby files - 0.102s
success onPreBootstrap - 0.021s
⠀
info gatsby-source-wordpress
This is either your first build or the cache was cleared.
Please wait while your WordPress data is synced to your Gatsby cache.
Maybe now's a good time to get up and stretch? :D
success gatsby-source-wordpress ingest WPGraphQL schema - 1.850s
success createSchemaCustomization - 3.438s
success gatsby-source-wordpress ContentType - 2.256s - fetched 3
success gatsby-source-wordpress Category - 4.185s - fetched 13
success gatsby-source-wordpress Comment - 4.516s - fetched 21
success gatsby-source-wordpress Menu - 1.837s - fetched 1
success gatsby-source-wordpress Page - 8.180s - fetched 31
success gatsby-source-wordpress Taxonomy - 2.235s - fetched 3
success gatsby-source-wordpress Post - 3.072s - fetched 10
success gatsby-source-wordpress Tag - 9.204s - fetched 54
success gatsby-source-wordpress User - 1.214s - fetched 4
ERROR
gatsby-source-wordpress Error category: undefined
Error:
Internal server error
Debug message:
Expected a value of type "Int" but received: 3.99
ERROR
gatsby-source-wordpress Error category: undefined
Error:
Internal server error
Debug message:
Expected a value of type "Int" but received: 3.99
... about 10 more error messages of same format as above.
Another message reads: Expected a value of type "Int" but received: 4.25. And also 4.13, 4.3, 3.51.
I can share the link to graphql URL privately if needed (and link to repo). I was unable to reproduce using a local WP instance with same file types uploaded. This issue is present regardless of the value of useGatsbyImage in the plugin config.
Further details:
MacBook Pro (Retina, 13-inch, Early 2015)
Node v12.10.0
gatsby-cli -v 2.12.58
Hi @etnichols , thanks for opening this issue. If you can send me the live api endpoint & repo that would be super helpful! My email is tyler@gatsbyjs.com
Hi @etnichols it looks like this is a bug in WPGraphQL. The type of the focalLength field should be a float but it's an int.
See wp-graphql/wp-graphql#1371 for more info. I've opened a PR to fix this in WPGQL but you can resolve it yourself temporarily by omitting that field.
As a sidenote this inspired me to improve the error messages a bit. The errors didn't have the path to the GraphQL field causing the error, so I've added that in v1.0.1. Now errors include something like: Error path: mediaItems.nodes[77].mediaDetails.meta.focalLength
Hi there,
First off thanks for your work on this awesome plugin! I got the starter site working and love to see the auto-rebuilds after WP content changes.
I'm attempting to use gatsby-source-wordpress-experimental on a site that has 300+ MediaItems of types .jpg, .png, .pdf, .docx, .wmv .pptx, .mp4, .bmp.
Details:
Using
"gatsby-source-wordpress-experimental": "^0.8.6"
plugin entry in
gatsby-config.js
(it is largely copy/pasta from the starter site):Attempting to run
gatsby develop
yields following output:Another message reads:
Expected a value of type "Int" but received: 4.25
. And also4.13
,4.3
,3.51
.I can share the link to graphql URL privately if needed (and link to repo). I was unable to reproduce using a local WP instance with same file types uploaded. This issue is present regardless of the value of
useGatsbyImage
in the plugin config.Further details:
MacBook Pro (Retina, 13-inch, Early 2015)
Node v12.10.0
gatsby-cli -v 2.12.58
Full dump of package.json deps:
Please let me know if I can provide any further information to aid debugging. Thank you!
The text was updated successfully, but these errors were encountered: