Skip to content
This repository was archived by the owner on Nov 15, 2020. It is now read-only.

Auto-Refresh feature and refresh button added#11

Open
kidunot89 wants to merge 4 commits into
wp-graphql:masterfrom
kidunot89:feature/auto-refresh
Open

Auto-Refresh feature and refresh button added#11
kidunot89 wants to merge 4 commits into
wp-graphql:masterfrom
kidunot89:feature/auto-refresh

Conversation

@kidunot89
Copy link
Copy Markdown

@kidunot89 kidunot89 commented Apr 1, 2019

If GRAPHQL_DEBUG is set to true. The GraphiQL fetcher will refresh every 5000 15000 ms. A specific interval time can be set by setting GRAPHQL_DEBUG to the desired number of milliseconds.

A Refresh button was also added to the toolbar, in case the interval to some high.

Comment thread class-wpgraphiql.php Outdated
*/
if ( strpos( get_current_screen()->id, 'wp-graphiql/wp-graphiql' ) && $this->is_wpgraphql_active() ) {

wp_enqueue_style( 'wp-graphiql-theme', '//cdnjs.cloudflare.com/ajax/libs/codemirror/5.23.0/theme/solarized.css', array(), false, false );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kidunot89 looks like this PR is doing a lot more than adding a refresh button 😂

I'll pull this down and check it out

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I forgot to take out the theme I set, my bad.

@jasonbahl
Copy link
Copy Markdown
Contributor

Yo, I'm seeing some gnarly issue when I check this out. . .it looks like it tries to refetch the Schema constantly without stopping at all.

Attached is a screenshot, but it doesn't do it justice. It's flickering nonstop for me and creating infinite HTTP requests for the Schema.

Haven't dug into the code, but something is busted for sure.

graphiql

@kidunot89
Copy link
Copy Markdown
Author

That weird, I've been using the branch since I created it a week ago with little to no issue. Based upon the screenshot. It looks like the GRAPHQL_DEBUG flags is set to true and being read a 1. Try changing it to a number like 6000 or 15000.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants