Code Monkey home page Code Monkey logo

wp-graphiql's Introduction

alt text

WPGraphQL

WPGraphQL is a free, open-source WordPress plugin that provides an extendable GraphQL schema and API for any WordPress site.

Below are some links to help you get started with WPGraphQL


Total Downloads Monthly Downloads Daily Downloads Latest Stable Version License Actions Status Actions Status Coverage Status

Install

  • Requires PHP 7.1+
  • Requires WordPress 5.0+

Quick Install

Follow the WPGraphQL Quick Start instructions to install and activate WPGraphQL Details here

Additional Documentation

Shout Outs

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Backers on Open Collective

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Sponsors on Open Collective

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Privacy Policy

WPGraphQL uses Appsero SDK to collect some telemetry data upon user's confirmation. This helps us to troubleshoot problems faster & make product improvements.

Appsero SDK does not gather any data by default. The SDK only starts gathering basic telemetry data when a user allows it via the admin notice. We collect the data to ensure a great user experience for all our users.

Integrating Appsero SDK DOES NOT IMMEDIATELY start gathering data, without confirmation from users in any case.

Learn more about how Appsero collects and uses this data.

wp-graphiql's People

Contributors

dependabot[bot] avatar henrikwirth avatar homerjam avatar jasonbahl avatar richaber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

wp-graphiql's Issues

Wrong location url

It's sending requests to localhost/graphql where my site is localhost/sitename/grapqhl, changing it in App js or in bundle didn't fix the issue.

Uri too long

Some servers will error if the URI is too long. Since the query is encoded into the url, this will sometimes be problematic.
When the query is removed from the url, the query still loads into the page. I assume from local storage. Is there a reason to encode the query in the url?

Question: Are graphql_single_name and graphql_plural_name optional, if not can they be?

Setting up graphql for a custom post type following the directions here.

Document indicates that setting graphql_single_name and graphql_plural_name is required. Wondering if this is strictly true and if so why? Seems like WPGraphQL could (by default) pull from the singular and plural labels of the CPT and allow an overwrite using above two if necessary?

Not a huge issue, more curious than anything.

Asset manifest fails to load in Local By Flywheel with a self-signed cert

Hello, I am using "Local by Flywheel" for local development, with a self-signed certificate.

Local by Flywheel is a Docker based dev environment. It uses separate containers to run individual WordPress installations, and a separate "router" container to intercept and reverse proxy HTTPS connections to the appropriate WP install container. In this environment, with a self signed certificate, file_get_contents() fails to read the manifest, as the curl connection is refused.

\WPGraphiQL::get_app_manifest():63, uses file_get_contents to read the asset-manifest.json via URL, thusly:

$manifest = file_get_contents( plugins_url( 'wp-graphiql/assets/app/build/asset-manifest.json' ) );

Due to the refused connection, the GraphiQL admin screen is blank, and PHP logs the following:

PHP Warning:  file_get_contents(https://dev.local/wp-content/plugins/wp-graphiql/assets/app/build/asset-manifest.json): failed to open stream: Connection refused in /app/public/wp-content/plugins/wp-graphiql/wp-graphiql.php on line 63
PHP Stack trace:
PHP   1. {main}() /app/public/wp-admin/admin.php:0
PHP   2. require_once() /app/public/wp-admin/admin.php:216
PHP   3. do_action() /app/public/wp-admin/admin-header.php:97
PHP   4. WP_Hook->do_action() /app/public/wp-includes/plugin.php:453
PHP   5. WP_Hook->apply_filters() /app/public/wp-includes/class-wp-hook.php:310
PHP   6. WPGraphiQL->enqueue_react_app() /app/public/wp-includes/class-wp-hook.php:286
PHP   7. WPGraphiQL->get_app_stylesheet() /app/public/wp-content/plugins/wp-graphiql/wp-graphiql.php:112
PHP   8. WPGraphiQL->get_app_manifest() /app/public/wp-content/plugins/wp-graphiql/wp-graphiql.php:74
PHP   9. file_get_contents() /app/public/wp-content/plugins/wp-graphiql/wp-graphiql.php:63

However, if I modify \WPGraphiQL::get_app_manifest():63 to read the manifest directly from the filesystem, everything works as intended:

$manifest = file_get_contents( dirname( __FILE__ ) . '/assets/app/build/asset-manifest.json' );

I am unsure as to why it would be necessary to read the manifest file into PHP via URL, since it is available in the plugin assets, and can be read directly from the filesystem. Perhaps reading the manifest file directly from the filesystem could be a better route?

Plugin installation

When activated I get this warning in the GraphiQL interface
file_get_contents ....../wp-content/plugins/wp-graphiql/assets/app/build/asset-manifest.json): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found

This is the call stack

do_action('admin_enqueue_scripts')
wp-admin/admin-header.php:97
WPGraphiQL->enqueue_react_app()
wp-includes/class-wp-hook.php:286
WPGraphiQL->get_app_stylesheet()
wp-content/plugins/wp-graphiql-master/wp-graphiql.php:109
WPGraphiQL->get_app_manifest()
wp-content/plugins/wp-graphiql-master/wp-graphiql.php:71
file_get_contents()
wp-content/plugins/wp-graphiql-master/wp-graphiql.php:60

Any ideas? This is my first wordpress with GraphiQL application so apologies if the solution is obvious.

composer support

Hey! Such a great and super-useful plugin, huge thanks for this.

Is there any chance you'd consider adding composer support for this repo?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.