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

Internal server error when querying an author using nodeByUri #86

Open
LarsEjaas opened this issue Oct 23, 2023 · 0 comments
Open

Internal server error when querying an author using nodeByUri #86

LarsEjaas opened this issue Oct 23, 2023 · 0 comments

Comments

@LarsEjaas
Copy link

LarsEjaas commented Oct 23, 2023

I am trying to do a seedQuery as described here: https://faustjs.org/reference/seed-query
When I do this for a author URL with the format: blog/author/ I get a server error when the wp-graphql-polylang plugin is activated.

Steps to reproduce:

  1. Set permalink structure to: /blog/%postname%/
  2. Activate the Polylang plugin and the WPGraphQL plugin.
  3. Do the following query from within the WPGraphiQL IDE in WordPress Admin(this was simplified a lot - but enough to trigger the error):
query GET_NODE_BY_URI( $uri: String! = "") {
  ... on RootQuery {
    node: nodeByUri(uri: $uri) {
      uri
      id
    }
  }
}

Variables:
{ "uri": "blog/author/<author-name>" }

This will return the following data:

  "data": {
    "node": {
      "uri": "/blog/author/ejaasheadless/",
      "id": "dXNlcjox"
    }
  }
  1. Activate the WP GraphQL Polylang plugin and execute the query from within the WPGraphiQL IDE again. This will return the following error:
"debugMessage": "WPGraphQL\\Registry\\TypeRegistry::get_type(): Argument #1 ($type_name) must be of type string, null given, called in /var/www/html/wp-content/plugins/wp-graphql/src/Type/InterfaceType/UniformResourceIdentifiable.php on line 59",
     "message": "Internal server error",

I have tested on:

  • WordPress v. 6.3.2
  • WPGraphQL v. 1.17.0
  • Polylang v. 3.5.1
  • WP GraphQL Polylang v. 0.6.0
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

1 participant