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

Auto-Refresh feature and refresh button added #11

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kidunot89
Copy link
Member

@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.

*/
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
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
Member 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
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
Member 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.

@jasonbahl jasonbahl added this to To Prioritize in 4: Actionable Issues Aug 7, 2019
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.

None yet

2 participants