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

no queries work #31

Closed
jake-101 opened this issue Apr 20, 2019 · 7 comments
Closed

no queries work #31

jake-101 opened this issue Apr 20, 2019 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@jake-101
Copy link

jake-101 commented Apr 20, 2019

I tried out the master branch with wpgraphql 0.3.2 and querying for product didn't work. I tried the develop branch and it gave my site a 500 error. It's a broad question but are there any tips for getting it to work?

Here is a test query:

query GET_PRODUCTS {
  products {
    edges {
      node {
        id
      }
    }
  }
}
@jake-101
Copy link
Author

jake-101 commented Apr 20, 2019

Found this error but will troubleshoot more later.

PHP Fatal error: require(): Failed opening required '/wp-content/plugins/wp-graphql-woocommerce/vendor/composer/../symfony/polyfill-ctype/bootstrap.php' (include_path='.:/opt/alt/php72/usr/share/pear') in /wp-content/plugins/wp-graphql-woocommerce/vendor/composer/autoload_real.php on line 66

I need to install ext-pdo in my PHP.ini but I have a somewhat locked down host. :(

@kidunot89
Copy link
Member

kidunot89 commented Apr 21, 2019

Have you tried running composer dumpautoload -o in the project working directory? There is a error in autoloader files included when you clone the master branch. It'll be fix in the v0.0.2 which will be released on tomorrow or Monday.

@jake-101
Copy link
Author

I did, that's how I got the error that I needed ext-pdo. Thanks for getting back to me!

@jake-101
Copy link
Author

jake-101 commented Apr 21, 2019

This is the complete error.

composer dumpautoload -o
Generating optimized autoload files
[ wp-graphql-woocommerce-develop]$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for lucatume/wp-browser 2.2.1 -> satisfiable by lucatume/wp-browser[2.2.1].
    - lucatume/wp-browser 2.2.1 requires ext-pdo * -> the requested PHP extension pdo is missing from your system.

  To enable extensions, verify that they are enabled in your .ini files:
    - /opt/alt/php72/etc/php.ini
    - /opt/alt/php72/link/conf/alt_php.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP i

@kidunot89
Copy link
Member

Oh I see what's happening, First delete the vendor directory and composer.lock rm -rf vendor composer.lock and run composer install --no-dev to install without lucatume/wp-browser the codeception testing framework. The testing framework needs ext-pdo, however the plugin does not.

@kidunot89 kidunot89 added the bug Something isn't working label Apr 21, 2019
@kidunot89 kidunot89 self-assigned this Apr 21, 2019
@jake-101
Copy link
Author

I'll try this out when I get home. Thanks and Happy Easter

@jake-101
Copy link
Author

composer install --no-dev didn't work but deleting lucatume/wp-browser from the composer.json did. I am able to make queries now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants