pristas-peter / wp-graphql-gutenberg

Query gutenberg blocks with wp-graphql
https://wp-graphql-gutenberg.netlify.app
GNU General Public License v3.0
299 stars 61 forks source link

Updates to work with WPGraphQL v1.6+ #117

Closed jasonbahl closed 3 years ago

jasonbahl commented 3 years ago

This PR updates some code to play nice with the WPGraphQL 1.6 Lazy Type loading

I've tested this PR against WPGraphQL v1.5.8 and 1.6.2


closes #116


BEFORE: Before this PR, 1.6+ would cause GraphiQL to never load with a resolveType() error.

Screen Shot 2021-08-06 at 1 04 33 PM

AFTER: With this PR, I can load GraphiQL, browse the Types, construct queries and execute queries.


Faster Load Times!:

The main focus of WPGraphQL v1.6 release was to improve performance all around, and with WPGraphQL for Gutenberg active, things could get a bit slow.

With WPGraphQL v1.6 and this PR in place for WPGraphQL for Gutenberg, we're seeing significant performance wins 👏🏻

Before

With WPGraphQL + Gutenberg on WPGraphQL v1.5.8 the Schema would take 9.53s to load in GraphiQL for me:

Screen Shot 2021-08-06 at 1 05 52 PM

After

With WPGraphQL for Gutenberg (with this PR) and WPGraphQL v1.6.2 the Schema loads in GraphiQL in just 2.27s!

Screen Shot 2021-08-06 at 1 09 53 PM

jonsherrard commented 3 years ago

This is amazing! @jasonbahl, between this and v0.5.* of wp-graphql-acf, WordPress is the JamStack CMS of my dreams again. Just need a couple of wp-graphql-gutenberg-acf bugs squashed and I can close my prismic account forever 😆

jasonbahl commented 3 years ago

@jonsherrard that's music to my ears! Love how successful folks can be building amazing things with this stack! 🙏🏻