Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gatsby-source-wordpress - Unable to retrieve hierarchical data from WordPress #38460

Open
2 tasks done
sampokataja opened this issue Aug 17, 2023 · 0 comments
Open
2 tasks done
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby

Comments

@sampokataja
Copy link

Preliminary Checks

Description

I am not able to retrieve hierarchical data from WordPress when using gatsby-source-wordpress package. I have tried with the newest version of Gatsby - only dependency being the aforementioned (version 7.11.0).

I also have the newest versions of WordPress (^6.2) and WPGraphQL-plugin (1.14.10) installed.

I do not have these issues when using the WPGraphQL provided IDE, only in https://localhost:8000/___graphql

I think these issues occured after: #37931 was fixed.

Reproduction Link

.

Steps to Reproduce

  1. Install WordPress with WPGraphQL-plugin
  2. Add parent > child relation between two Pages
  3. Install Gatsby and gatsby-source-wordpress and do the necessary gatsby-config.js modifications
  4. Run gatsby develop and navigate to https://localhost:8000/___graphql
  5. Run query: query MyQuery { allWpPage { nodes { wpParent { node { id } } } } }
    ...

Expected Result

I should receive the queried fields

Actual Result

{
  "errors": [
    {
      "message": "Cannot read properties of undefined (reading 'type')",
      "locations": [
        {
          "line": 15,
          "column": 9
        }
      ],
      "path": [
        "wpPage",
        "wpParent",
        "node"
      ],

Environment

System:
    OS: macOS 13.3.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.17.0 - ~/.nvm/versions/node/v18.17.0/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 9.6.7 - ~/.nvm/versions/node/v18.17.0/bin/npm
  Browsers:
    Chrome: 115.0.5790.114
    Safari: 16.4
  npmPackages:
    gatsby: ^5.11.0 => 5.11.0 
    gatsby-plugin-image: ^3.11.0 => 3.11.0 
    gatsby-plugin-manifest: ^5.11.0 => 5.11.0 
    gatsby-plugin-sharp: ^5.11.0 => 5.11.0 
    gatsby-source-filesystem: ^5.11.0 => 5.11.0 
    gatsby-source-wordpress: ^7.11.0 => 7.11.0 
    gatsby-transformer-sharp: ^5.11.0 => 5.11.0 
  npmGlobalPackages:
    gatsby-cli: 5.11.0

Config Flags

No response

@sampokataja sampokataja added the type: bug An issue or pull request relating to a bug in Gatsby label Aug 17, 2023
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

1 participant