Giter VIP home page Giter VIP logo

Comments (17)

pristas-peter avatar pristas-peter commented on June 3, 2024 3

Hi, should be fixed in 39dec64

from wp-graphql-gutenberg.

pristas-peter avatar pristas-peter commented on June 3, 2024 2
Field "id" of type "Block!" must have a sub selection.
Error path: undefined

Error occurred while fetching nodes of the "BlockEditorPreview" type.

The error above seems like an issue with the source plugin.

@TylerBarnes
@rodrigo-arias

from wp-graphql-gutenberg.

brogr avatar brogr commented on June 3, 2024 1

I'm running into the same issue and downgraded to Gatsby v2 to resolve it.
It's also being tracked here:
gatsbyjs/gatsby#29966
gatsbyjs/gatsby#30232

from wp-graphql-gutenberg.

TylerBarnes avatar TylerBarnes commented on June 3, 2024 1

This e3827bb#diff-657bdea0255816a3f6039d76e52f6021deb86dc513cb8d7f030726dd998254c9R17 should be 'type' => ['non_null' => 'ID'] as far as I can tell.

from wp-graphql-gutenberg.

anicioalexandre avatar anicioalexandre commented on June 3, 2024

Any news about this error?

from wp-graphql-gutenberg.

rodrigo-arias avatar rodrigo-arias commented on June 3, 2024

Hopefully it can be solved since it is difficult to migrate this plugin after you have an integration, however, I am somewhat skeptical because I have not seen the owner maintain the plugin or even answer the issues.

from wp-graphql-gutenberg.

brogr avatar brogr commented on June 3, 2024

Does anyone have the capacity to test this suggested solution?

from wp-graphql-gutenberg.

pristas-peter avatar pristas-peter commented on June 3, 2024

Hi everybody, to be honest I don't have much time for this plugin right now, but PRs are always welcome. However this seems like a minor bug, I'll see what I can do.

from wp-graphql-gutenberg.

pristas-peter avatar pristas-peter commented on June 3, 2024

Could you try this branch?

https://github.com/pristas-peter/wp-graphql-gutenberg/tree/gatsby-v3-test

from wp-graphql-gutenberg.

rodrigo-arias avatar rodrigo-arias commented on June 3, 2024

@brogr that solution didn't work for me.

@pristas-peter thanks for working on this, I have a different error now

gatsby-source-wordpress  (undefined) location: line 1, column: 510
Field "id" of type "Block!" must have a sub selection.
Error path: undefined

Error occurred while fetching nodes of the "BlockEditorPreview" type.

from wp-graphql-gutenberg.

 avatar commented on June 3, 2024

Hi,

I have minor knowledge of php, so i don't know if this fix is the way to go - but it seems that i have got things working this evening with a tweak in the branch @pristas-peter commented.

This seems to solve the error. After this i had to make sure all my other plugins where updated for any braking changes with gatsby v3 - https://www.gatsbyjs.com/docs/reference/release-notes/migrating-from-v2-to-v3/

Sorry for commenting with an image, I'm not familiar with what you can do with Github.

Screenshot 2021-03-28 at 23 58 56

from wp-graphql-gutenberg.

TylerBarnes avatar TylerBarnes commented on June 3, 2024

For anyone who needs a workaround, you can add this to your plugin options:

{
  resolve: `gatsby-source-wordpress`,
  options: {
    type: {
      BlockEditorContentNode: { exclude: true }
    }
  }
}

I will have to add some logic that auto excludes node types that don't have an id or non_null id

from wp-graphql-gutenberg.

pristas-peter avatar pristas-peter commented on June 3, 2024

Fixed in e3827bb

from wp-graphql-gutenberg.

rodrigo-arias avatar rodrigo-arias commented on June 3, 2024

At least for me this is not fixed. Maybe it needs an adjustment also in gatsby-source-wordpress as Tyler mentions.
Excluding the node prevents errors, but of course you are not fetching the Block data.

from wp-graphql-gutenberg.

dannyvaughton avatar dannyvaughton commented on June 3, 2024

Nor me, I am now getting

gatsby-source-wordpress  (undefined) location: line 1, column: 510
         Field "id" of type "Block!" must have a sub selection.

from wp-graphql-gutenberg.

TylerBarnes avatar TylerBarnes commented on June 3, 2024

I think that's not a source plugin issue as that error is happening while fetching from WPGraphQL, not on the Gatsby side. It looks like the error is saying the id field is typed as Block! (which would be an object type and require a sub-selection) but it should be typed as ID!, right?

from wp-graphql-gutenberg.

rodrigo-arias avatar rodrigo-arias commented on June 3, 2024

I'd tried that before but it seems that I forgot update the blocks registry. I can confirm that this is fixed. Thanks @pristas-peter

from wp-graphql-gutenberg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.