Replies: 3 comments 6 replies
-
@tsdexter you'll need to chat with the folks maintaining Gatsby Source WordPress. The client needs to be able to make GET requests. I know @TylerBarnes tinkered with that at some point, but I'm not sure if anything official came of it, or if there's a setting to allow you to override the default POST requests, etc. Gatsby would almost certainly need to play nice with Persisted Queries as well, because the query strings Gatsby sends over would likely often exceed Query String limits for GET requests, which is solved by persisted queries and querying via queryIds |
Beta Was this translation helpful? Give feedback.
-
tbh, Gatsby might not even benefit that much from it, because of how Gatsby talks to WPGraphQL. Gatsby introspects the schema and fetches everything it possibly can whenever the schema changes, so new queries with different fields will all be cache misses. There's a lot of things that could change in your Schema that would cause Gatsby to generate new queries, and even if you're not using any of the data represented by the schema changes, Gatsby's still going to ask for it, sending new, different queries that would be cache misses anyway. When using something like FaustJS + Next (what WPGraphQL.com is built on) you're querying only what you need for the templates that need it, so the queries can get more benefit more consistently from this type of caching. |
Beta Was this translation helpful? Give feedback.
-
Hi @jasonbahl,
You mentioned in the announcement post about Gatsby suffering due to using POST requests, but never came back to it.
Is there any documentation as to how Gatsby can benefit from this? Based on the brief mention, it seems the only way a fully static Gatsby site would benefit would be by switching to GET requests and/or using saved queries. How would this be done though? Seems to me it would require substantial changes to
gatsby-plugin-wordpress
?Can you point me in the right direction?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions