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

Error when using RootQueryToPageConnectionWhereArgsTaxQueryOperator enum as a variable #31

Open
ltroya-as opened this issue Jul 14, 2022 · 0 comments

Comments

@ltroya-as
Copy link

Hi guys,

I found an issue when passing the RootQueryToPageConnectionWhereArgsTaxQueryOperator enum as a variable, it throws the following error:

{
  "errors": [
    {
      "debugMessage": "Type loader is expected to return a callable or valid type \"RootQueryToPageConnectionWhereArgsTaxQueryOperator\", but it returned null",
      "message": "Internal server error",
      "extensions": {
        "category": "internal"
      }
    }
  ]
}

This is the stack trace when running the query below on WP-GraphQL 1.6.12:
https://gist.github.com/ltroya-as/8b0bf88d8bdbee5bd8789121633c5434

And the query to reproduce the issue:

query getArticlesByCategories(
  $operator: RootQueryToPageConnectionWhereArgsTaxQueryOperator = IN
) {
  pages(
    where: {
      taxQuery: {
        taxArray: [
          {
            terms: ["cat1", "cat2"]
            taxonomy: CATEGORY
            operator: $operator
            field: SLUG
          }
        ]
      }
    }
  ) {
    nodes {
      slug
    }
  }
}

That error happens on the following versions: 1.6.12, 1.8.2, and 1.8.6.

However, it works on 1.5.8

Thread on WP-GraphQL Slack:
https://wp-graphql.slack.com/archives/C3NM1M291/p1657813663734659

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