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

Reusable blocks on page query requires Authentication #128

Open
EarthlingDavey opened this issue Nov 9, 2021 · 1 comment
Open

Reusable blocks on page query requires Authentication #128

EarthlingDavey opened this issue Nov 9, 2021 · 1 comment

Comments

@EarthlingDavey
Copy link

The example code below requires Authentication. Expected behaviour is for them to be publicly accessible, the same as other blocks. If this behaviour is intentional, then I think it should be in the docs or have a descriptive error message.

Thanks for the plugin, and sorry I don't have the time to dive in and make a PR for a fix.

{
  pages {
    nodes {
      blocks {
        ... on CoreBlock {
          reusableBlock {
            ... on ReusableBlock {
              blocks {
                originalContent
              }
            }
          }
        }
      }
    }
  }
}

@jeremyswann
Copy link

jeremyswann commented Nov 25, 2021

I get an error message, not sure why its behind auth either.

{
  "errors": [
    {
      "debugMessage": "get_object_vars(): Argument #1 ($object) must be of type object, array given",
      "message": "Internal server error",
      "extensions": {
        "category": "internal"
      },
      "locations": [
        {
          "line": 11,
          "column": 9
        }
      ],
      "path": [
        "pages",
        "edges",
        0,
        "node",
        "blocks"
      ],
      "trace": [
        {
          "file": ".../wp-content/plugins/wp-graphql-gutenberg-0.3.11/vendor/opis/json-schema/src/Validator.php",
          "line": 1792,
          "function": "get_object_vars(array(1))"
        }
      ]
    }
  ],
  "extensions": {
    "debug": []
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants