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

Cannot declare the same value for "graphql_single_name" and "graphql_plural_name" #456

Closed
oxcid opened this issue Mar 17, 2021 · 2 comments

Comments

@oxcid
Copy link

oxcid commented Mar 17, 2021

Describe the bug
"No Schema Available" in Explorer in GraphiQL IDE

To Reproduce
Steps to reproduce the behavior:

  1. Activate plugin WP GraphQL ver. 1.2.6
  2. Activate plugin WPGraphQL WooCommerce (WooGraphQL) ver. 0.8.0
  3. See error

Expected behavior
The list of queries are available in the Explorer.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Firefox
  • Version 86.0.1 (64-bit)

Plugin Versions

  • WooGraphQL Version: 0.8.0
  • WPGraphQL Version: 1.2.6
  • WordPress Version: 5.4.2
  • WooCommerce Version: 3.8.1

Additional context

Error log at the server:

2021-03-18 02:16:40.495649 [NOTICE] [1050] [158.140.xxx.xxx:38275:HTTP2-59#wordpress] [STDERR] PHP Fatal error: Uncaught GraphQL\Error\InvariantViolation: The pa_qty-pcs taxonomy cannot declare the same value for "graphql_single_name" and "graphql_plural_name". in /var/www/html/wp-content/plugins/wp-graphql/src/
Registry/TypeRegistry.php:457
Stack trace:
#0 /var/www/html/wp-includes/class-wp-hook.php(287): WPGraphQL\Registry\TypeRegistry->init_type_registry(Object(WPGraphQL\Registry\TypeRegistry))
#1 /var/www/html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
#2 /var/www/html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#3 /var/www/html/wp-content/plugins/wp-graphql/src/Registry/TypeRegistry.php(197): do_action('init_graphql_ty...', Object(WPGraphQL\Registry\TypeRegistry))
#4 /var/www/html/wp-content/plugins/wp-graphql/src/Registry/SchemaRegistry.php(37): WPGraphQL\Registry\TypeRegistry->init()
#5 /var/www/html/wp-content/plugins/wp-graphql/src/WPGraphQL.php(576): WPGraphQL\Registry\SchemaRegistry->get_schema()
#6 /var/www/html/wp-content/plugins/wp-graphql/src/Request.php(143): WPGraph in /var/www/html/wp-content/plugins/wp-graphql/src/Registry/TypeRegistry.php on
line 457

I also got some errors at the console, but I believe the PHP error log is more crucial.

@jacobarriola
Copy link
Contributor

jacobarriola commented Mar 17, 2021

It's likely due to the name of your qty-pcs attribute ending in an s. Can you rename it to singular (qty-pc) instead?

See #412 for more details.

@oxcid
Copy link
Author

oxcid commented Mar 18, 2021

Thanks Jacob, I've removed the s and renamed it to qty-pc. All is working now.

@oxcid oxcid closed this as completed Mar 18, 2021
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