{"id":5315,"date":"2023-06-14T08:27:14","date_gmt":"2023-06-14T14:27:14","guid":{"rendered":"https:\/\/wpengine.com\/builders\/?p=5315"},"modified":"2023-07-14T08:34:06","modified_gmt":"2023-07-14T13:34:06","slug":"moving-get-post-requests-faust-js-1-0-wpgraphql","status":"publish","type":"post","link":"https:\/\/wpengine.com\/builders\/moving-get-post-requests-faust-js-1-0-wpgraphql\/","title":{"rendered":"Moving to GET from POST Requests with Faust.js 1.0 &#038; WPGraphQL"},"content":{"rendered":"\n<p>As WP Engine approaches two years of offering <a href=\"https:\/\/wpengine.com\/headless-wordpress\/\">solutions for headless WordPress on the Atlas Platform<\/a> and <a href=\"https:\/\/faustjs.org\/\">Faust.js<\/a> nears its 1.0 launch, we&#8217;ve had a lot of time to reflect and learn about the best practices needed to deliver headless WordPress solutions at scale. In this post, we&#8217;ll talk about one of those best practices, explore why it&#8217;s relevant, and talk about how we&#8217;re solving this for you on a foundational level so you can forget about this and go back to writing your site or app.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Understanding WordPress as a GraphQL API<\/h2>\n\n\n\n<p>While headless WordPress is becoming more widely used, it still represents a small fraction of total WordPress installs, and we work with people implementing headless WordPress across the spectrum of hosting providers. Because headless WordPress isn&#8217;t the default use case for many hosts, we need to think about how we structure our applications and tools to accommodate a wide variation in performance.<\/p>\n\n\n\n<p>The largest bottleneck we typically see is around data fetching from the GraphQL API, particularly when <a href=\"https:\/\/wpengine.com\/builders\/efficient-ssg-in-next-js-with-wpgraphql\/\">you are building or prerendering a lot of pages all at once<\/a>. I&#8217;ve personally seen examples where a Netlify build process was sending 300 requests per second to build a medium-sized website. \ud83d\ude2e For many shared WordPress hosts, that is easily enough load to start causing timeouts, which lead to failed builds or a <code>5XX<\/code> error of some kind. With Atlas, we smartly scope your build cores to what your backend can support (since we know about both parts of your app), but that only solves part of the issue, and only on our platform \ud83d\ude09. <\/p>\n\n\n\n<p>What if your site or application makes lots of simultaneous data requests in a hybrid rendering mode after build time? Or what if many of your pages can&#8217;t or shouldn&#8217;t be built statically because you need fresh data, like a newsroom or publication?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Making GraphQL Data More Cachable<\/h2>\n\n\n\n<p>Traditional WordPress hosting relies on full-page caching to both accelerate site resources and limit the load on shared infrastructure. For most hosts, WP Engine included, GET requests to the REST API are cached as well, typically along the same guidelines as a regular page cache: 600 seconds.<\/p>\n\n\n\n<p>But most headless WordPress examples and starter projects, especially those using WPGraphQL, don&#8217;t take advantage of any caching layer because they use POST requests instead of GET requests. <\/p>\n\n\n\n<p>In traditional HTTP-based systems, like REST APIs for example, <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Methods\">request methods<\/a> are almost like verbs, performing a certain action against a system. <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Methods\/GET\">GET requests<\/a> are typically used to retrieve data from an external system and are usually considered cachable requests. <\/p>\n\n\n\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Methods\/POST\">POST requests<\/a>, on the other hand, are requests that send data to the server, and these requests, because they often create resources, can cause side effects on the server. For this reason, POST requests bypass most network caching layers and generate a fresh response every time, even when the actual request is only retrieving data. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The POST Method as Convention<\/h3>\n\n\n\n<p>Part of this comes down to convention in how developers use GraphQL, with a POST request being the most common method for sending requests to a <code>\/graphql<\/code> endpoint. Even Apollo Client&#8217;s default fetch method is POST, for example.<\/p>\n\n\n\n<p>POST requests to a GraphQL server typically result in a JSON-encoded object that looks like this as the request body:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-code-table shcb-line-numbers\"><span class='shcb-loc'><span>{\n<\/span><\/span><span class='shcb-loc'><span>  <span class=\"hljs-string\">\"query\"<\/span>: <span class=\"hljs-string\">\"...\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>  <span class=\"hljs-string\">\"operationName\"<\/span>: <span class=\"hljs-string\">\"...\"<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>  <span class=\"hljs-string\">\"variables\"<\/span>: { <span class=\"hljs-string\">\"myVariable\"<\/span>: <span class=\"hljs-string\">\"someValue\"<\/span>, ... }\n<\/span><\/span><span class='shcb-loc'><span>}\n<\/span><\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>But most GraphQL servers, WPGraphQL included, can also support GET requests without any additional configuration. The request values, like <code>query<\/code>, <code>operationName<\/code>, and any <code>variables<\/code>, just need to be encoded in a different manner. Instead of sending the details of our query in the request body as JSON, they can be encoded in query parameters like many other GET requests.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Switching to GET Requests<\/h3>\n\n\n\n<p>In looking at this example taken from the <a href=\"https:\/\/graphql.org\/learn\/serving-over-http\/#http-methods-headers-and-body\">GraphQL docs<\/a>, the following query   results in a URL like the one below:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-code-table shcb-line-numbers\"><span class='shcb-loc'><span>{\n<\/span><\/span><span class='shcb-loc'><span>  me {\n<\/span><\/span><span class='shcb-loc'><span>    name\n<\/span><\/span><span class='shcb-loc'><span>  }\n<\/span><\/span><span class='shcb-loc'><span>}\n<\/span><\/span><span class='shcb-loc'><span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-attr\">http<\/span>:<span class=\"hljs-comment\">\/\/myapi\/graphql?query={me{name}}<\/span>\n<\/span><\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>And for the developer, switching to GET requests by default using an Apollo <code>HTTP Link<\/code> is as simple as switching the <code>useGETForQueries<\/code> option to <code>true<\/code>. The <a href=\"https:\/\/www.apollographql.com\/docs\/react\/api\/link\/apollo-link-http#usegetforqueries\">Apollo client<\/a> will then handle constructing your query&#8217;s URL for you. In doing this, you can take advantage of any network caching your host may have applied to this path, which should speed up your sites and make them more resilient. In this case, Apollo only uses GET for queries and will continue to use POST for mutations.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">A Change in Recommended Practice<\/h3>\n\n\n\n<p>After working with loads of developers and site builders across a number of platforms, the Faust.js and WPGraphQL teams felt like it was time to change the recommended practice to using GET requests by default, and you&#8217;ll see that change implemented as a new default in Faust.js soon.<\/p>\n\n\n\n<p>We also strongly recommend that you explore <a href=\"https:\/\/github.com\/wp-graphql\/wp-graphql-smart-cache\">WPGraphQL Smart Cache<\/a>. Even if you decide not to use GET requests, WPGraphQL Smart Cache will accelerate <a href=\"https:\/\/github.com\/wp-graphql\/wp-graphql-smart-cache\/blob\/main\/docs\/object-cache.md#object-cache-with-http-post-requests\">your post requests using an object cache<\/a>, providing you with some performance benefits.<\/p>\n\n\n\n<p>With that in mind, there are a few limitations to GET requests that should be called out.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Limitation 1: Query URI Can Be Too Long<\/h4>\n\n\n\n<p>Since a GET request contains your entire GraphQL query and variables, if it&#8217;s rather complex, it may bump into a server character limit. You can see an example of that here in <a href=\"https:\/\/github.com\/graphql\/graphiql\/issues\/590\">this GitHub issue noting an error code Request-URI Too Long<\/a>. For most sites, you should be fine, but if you have long queries and need to use GET requests, then <a href=\"https:\/\/github.com\/wp-graphql\/wp-graphql-smart-cache\/blob\/main\/docs\/persisted-queries.md\">the persisted queries feature of WP GraphQL Smart Cache<\/a> should help you out.<\/p>\n\n\n\n<p>Per the docs: <\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>In the GraphQL ecosystem, the term \u201cPersisted Queries\u201d refers to the idea that a GraphQL Query Document can be \u201cpersisted\u201d on the server, and can be referenced via a Query ID.<\/p>\n\n\n\n<p>There are several advantages to using Persisted Queries:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Avoid query string limits<\/li>\n\n\n\n<li>Reduced upload cost per request (uploading large GraphQL query documents for each request has a cost)<\/li>\n\n\n\n<li>Ability to mark specific queries as allow\/deny<\/li>\n\n\n\n<li>Ability to customize the cache-expiration time per query<\/li>\n\n\n\n<li>Future customizations at the individual query level<\/li>\n<\/ul>\n\n\n\n<p>WPGraphQL Smart Cache provides support for &#8220;Persisted Queries&#8221; and plays nice with the&nbsp;<a href=\"https:\/\/www.apollographql.com\/docs\/react\/api\/link\/persisted-queries\/\">Apollo Persisted Query Link<\/a>.<\/p>\n<cite>WPGraphQL Smart Cache Docs, Persisted Queries<\/cite><\/blockquote>\n\n\n\n<p>As you can see, there are lots of benefits to using persisted queries that may address other caching and access control issues. The newest version of Faust.js makes it easy to enable this feature using <a href=\"https:\/\/www.apollographql.com\/docs\/react\/api\/link\/persisted-queries\/\">Apollo&#8217;s persisted queries link functionality<\/a>. To opt-in to <a href=\"https:\/\/faustjs.org\/docs\/apollo#using-persisted-queries\">persisted queries in Faust<\/a>, set the value of the <code>usePersistedQueries<\/code> option in <code>faust.config.js<\/code> to <code>true<\/code>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Limitation 2: You Need Fresh Data<\/h4>\n\n\n\n<p>In most network caching strategies, server responses are cached for a particular length of time, for example, 600 seconds. If a change happens to the content within that 600-second window, it may not be reflected on your site because the data you receive from your query is cached. Typically there are ways to manually clear your site&#8217;s cache, but may not be something you want content creators to do.<\/p>\n\n\n\n<p>WPGraphQL Smart Cache also provides <a href=\"https:\/\/github.com\/wp-graphql\/wp-graphql-smart-cache\/blob\/main\/docs\/cache-invalidation.md\">fine-grained cache invalidation<\/a> based on WordPress events, so that any of your cached queries are invalidated when the underlying data changes.<\/p>\n\n\n\n<p>Per the docs:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Unlike RESTful APIs where each enpdoint is related to specific resource type, GraphQL Queries can be constructed in nearly infinite ways, and can contain resources of many types.<\/p>\n\n\n\n<p>Because of the flexibility that GraphQL offers, caching and invalidating caches can be tricky.<\/p>\n\n\n\n<p>This is where WPGraphQL Smart Cache really shines.<\/p>\n\n\n\n<p>When a GraphQL request is executed against the WPGraphQL endpoint, the query is analyzed at run time to determine:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The operation name of the query<\/li>\n\n\n\n<li>The ID of the query (a hash of the query document string)<\/li>\n\n\n\n<li>What types of nodes were asked for as a list<\/li>\n\n\n\n<li>The individual nodes resolved by the query<\/li>\n<\/ul>\n\n\n\n<p>The results of the GraphQL query are cached and &#8220;tagged&#8221; with this meta data.<\/p>\n\n\n\n<p>When&nbsp;<a href=\"https:\/\/github.com\/wp-graphql\/wp-graphql-smart-cache\/blob\/main\/docs\/cache-invalidation.md#tracked-events\">relevant events<\/a>&nbsp;occur in WordPress, WPGraphQL Smart Cache emits a&nbsp;<code>purge<\/code>&nbsp;action to purge cached documents with the key(s) called in the purge action.<\/p>\n<cite>WPGraphQL Smart Cache Docs, Cache Invalidation<\/cite><\/blockquote>\n\n\n\n<p>As you can see with some of these feature descriptions, the tooling around WPGraphQL has grown substantially over the last year. As a result of WP Engine&#8217;s continued investment in the ecosystem and the work being done by agencies building on the Atlas platform, headless WordPress is becoming easier to manage at an enterprise scale.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Does This Mean for You?<\/h2>\n\n\n\n<p>If you are currently using Faust.js, in the version 1.0 release you will see the default data-fetching method shift from POST to GET methods for queries. As a result, you should do the following things before upgrading:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Think about the caching strategy for your application: how often are your pages refreshed? What data can be cached and for how long? <\/li>\n\n\n\n<li>Explore WPGraphQL Smart Cache and its features. WP Engine supports it out of the box, but there are <a href=\"https:\/\/github.com\/wp-graphql\/wp-graphql-smart-cache\/blob\/main\/docs\/network-cache.md#hosting-guide\">methods to add support for your hosting provider<\/a><\/li>\n\n\n\n<li>Test the newest version before upgrading: do all your queries work and can you render all of your routes? <\/li>\n<\/ul>\n\n\n\n<p>For simple sites, this change in the default fetch method shouldn&#8217;t do anything but make your builds faster.<\/p>\n\n\n\n<p>For more complex sites or sites using complex queries, you may need to do additional testing to implement these patterns, but you are more likely to see performance gains by implementing these steps than a smaller site.<\/p>\n\n\n\n<p>And just because the Faust.js framework is making this change to the default method based on data from production usage, optional adoption is important to that team. &nbsp;If you would like to switch back to POST requests, you can do so by setting the&nbsp;<code>useGETForQueries<\/code>&nbsp;property to&nbsp;<code>false<\/code> in the <code>faust.config.js<\/code> file.<\/p>\n\n\n\n<p>If you need to make <a href=\"https:\/\/github.com\/wpengine\/faustjs\/blob\/fd17c60d03f001755212729f3089b8529bbc719b\/internal\/faustjs.org\/docs\/apollo.mdx#making-one-off-postget-requests\">one-off POST requests<\/a>, you can pass some additional <code>fetchOptions<\/code> to <code>useQuery<\/code>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-code-table shcb-line-numbers\"><span class='shcb-loc'><span><span class=\"hljs-keyword\">const<\/span> { data, loading, error } = useQuery(MY_QUERY, {\n<\/span><\/span><span class='shcb-loc'><span>  <span class=\"hljs-attr\">context<\/span>: {\n<\/span><\/span><span class='shcb-loc'><span>    <span class=\"hljs-attr\">fetchOptions<\/span>: {\n<\/span><\/span><span class='shcb-loc'><span>      <span class=\"hljs-attr\">method<\/span>: <span class=\"hljs-string\">'POST'<\/span>,\n<\/span><\/span><span class='shcb-loc'><span>    },\n<\/span><\/span><span class='shcb-loc'><span>  },\n<\/span><\/span><span class='shcb-loc'><span>});\n<\/span><\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Need Guidance or Have Feedback?<\/h2>\n\n\n\n<p>If you need any help or want to talk through how these changes may impact your application, join us in the <a href=\"https:\/\/developers.wpengine.com\/discord\">Headless WP Discord<\/a> so we can get your feedback.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As WP Engine approaches two years of offering solutions for headless WordPress on the Atlas Platform and Faust.js nears its 1.0 launch, we&#8217;ve had a lot of time to reflect [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_EventAllDay":false,"_EventTimezone":"","_EventStartDate":"","_EventEndDate":"","_EventStartDateUTC":"","_EventEndDateUTC":"","_EventShowMap":false,"_EventShowMapLink":false,"_EventURL":"","_EventCost":"","_EventCostDescription":"","_EventCurrencySymbol":"","_EventCurrencyCode":"","_EventCurrencyPosition":"","_EventDateTimeSeparator":"","_EventTimeRangeSeparator":"","_EventOrganizerID":[],"_EventVenueID":[],"_OrganizerEmail":"","_OrganizerPhone":"","_OrganizerWebsite":"","_VenueAddress":"","_VenueCity":"","_VenueCountry":"","_VenueProvince":"","_VenueState":"","_VenueZip":"","_VenuePhone":"","_VenueURL":"","_VenueStateProvince":"","_VenueLat":"","_VenueLng":"","_VenueShowMap":false,"_VenueShowMapLink":false,"footnotes":""},"categories":[23],"tags":[25,26],"class_list":["post-5315","post","type-post","status-publish","format-standard","hentry","category-headless","tag-faust-js","tag-wpgraphql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Moving to GET from POST Requests with Faust.js 1.0 &amp; WPGraphQL - Builders<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wpengine.com\/builders\/moving-get-post-requests-faust-js-1-0-wpgraphql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Moving to GET from POST Requests with Faust.js 1.0 &amp; WPGraphQL - Builders\" \/>\n<meta property=\"og:description\" content=\"As WP Engine approaches two years of offering solutions for headless WordPress on the Atlas Platform and Faust.js nears its 1.0 launch, we&#8217;ve had a lot of time to reflect [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/builders\/moving-get-post-requests-faust-js-1-0-wpgraphql\/\" \/>\n<meta property=\"og:site_name\" content=\"Builders\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-14T14:27:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-14T13:34:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/2023\/06\/img-opengraph-sitecover.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Everhart\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Moving from GET to POST Requests with Faust.js 1.0 &amp; WPGraphQL\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/2023\/06\/img-opengraph-sitecover.jpg\" \/>\n<meta name=\"twitter:creator\" content=\"@wpebuilders\" \/>\n<meta name=\"twitter:site\" content=\"@wpebuilders\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Everhart\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/moving-get-post-requests-faust-js-1-0-wpgraphql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/moving-get-post-requests-faust-js-1-0-wpgraphql\\\/\"},\"author\":{\"name\":\"Jeff Everhart\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#\\\/schema\\\/person\\\/b5a7f380738d25f57b00a5aaacf3db52\"},\"headline\":\"Moving to GET from POST Requests with Faust.js 1.0 &#038; WPGraphQL\",\"datePublished\":\"2023-06-14T14:27:14+00:00\",\"dateModified\":\"2023-07-14T13:34:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/moving-get-post-requests-faust-js-1-0-wpgraphql\\\/\"},\"wordCount\":1665,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#organization\"},\"keywords\":[\"Faust.js\",\"WPGraphQL\"],\"articleSection\":[\"Headless\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wpengine.com\\\/builders\\\/moving-get-post-requests-faust-js-1-0-wpgraphql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/moving-get-post-requests-faust-js-1-0-wpgraphql\\\/\",\"url\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/moving-get-post-requests-faust-js-1-0-wpgraphql\\\/\",\"name\":\"Moving to GET from POST Requests with Faust.js 1.0 & WPGraphQL - Builders\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#website\"},\"datePublished\":\"2023-06-14T14:27:14+00:00\",\"dateModified\":\"2023-07-14T13:34:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/moving-get-post-requests-faust-js-1-0-wpgraphql\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wpengine.com\\\/builders\\\/moving-get-post-requests-faust-js-1-0-wpgraphql\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/moving-get-post-requests-faust-js-1-0-wpgraphql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Moving to GET from POST Requests with Faust.js 1.0 &#038; WPGraphQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#website\",\"url\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/\",\"name\":\"Builders\",\"description\":\"Reimagining the way we build with WordPress.\",\"publisher\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#organization\",\"name\":\"WP Engine\",\"url\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wp-content\\\/uploads\\\/2024\\\/05\\\/WP-Engine-Horizontal@2x.png\",\"contentUrl\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wp-content\\\/uploads\\\/2024\\\/05\\\/WP-Engine-Horizontal@2x.png\",\"width\":348,\"height\":68,\"caption\":\"WP Engine\"},\"image\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/wpebuilders\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCh1WuL54XFb9ZI6m6goFv1g\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#\\\/schema\\\/person\\\/b5a7f380738d25f57b00a5aaacf3db52\",\"name\":\"Jeff Everhart\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/237d84b2a63acb8c427ba3246f9c5fc1b436aac578a5df421927c23b4fde45f5?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/237d84b2a63acb8c427ba3246f9c5fc1b436aac578a5df421927c23b4fde45f5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/237d84b2a63acb8c427ba3246f9c5fc1b436aac578a5df421927c23b4fde45f5?s=96&d=mm&r=g\",\"caption\":\"Jeff Everhart\"},\"description\":\"Jeff is a Senior Developer Advocate at WP Engine, focusing on educational resources that blend JavaScript and WordPress to support the Atlas headless WordPress platform and ecosystem.\",\"url\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/author\\\/jeff-everhartwpengine-com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Moving to GET from POST Requests with Faust.js 1.0 & WPGraphQL - Builders","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wpengine.com\/builders\/moving-get-post-requests-faust-js-1-0-wpgraphql\/","og_locale":"en_US","og_type":"article","og_title":"Moving to GET from POST Requests with Faust.js 1.0 & WPGraphQL - Builders","og_description":"As WP Engine approaches two years of offering solutions for headless WordPress on the Atlas Platform and Faust.js nears its 1.0 launch, we&#8217;ve had a lot of time to reflect [&hellip;]","og_url":"https:\/\/wpengine.com\/builders\/moving-get-post-requests-faust-js-1-0-wpgraphql\/","og_site_name":"Builders","article_published_time":"2023-06-14T14:27:14+00:00","article_modified_time":"2023-07-14T13:34:06+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/2023\/06\/img-opengraph-sitecover.jpg","type":"image\/jpeg"}],"author":"Jeff Everhart","twitter_card":"summary_large_image","twitter_title":"Moving from GET to POST Requests with Faust.js 1.0 & WPGraphQL","twitter_image":"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/2023\/06\/img-opengraph-sitecover.jpg","twitter_creator":"@wpebuilders","twitter_site":"@wpebuilders","twitter_misc":{"Written by":"Jeff Everhart","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wpengine.com\/builders\/moving-get-post-requests-faust-js-1-0-wpgraphql\/#article","isPartOf":{"@id":"https:\/\/wpengine.com\/builders\/moving-get-post-requests-faust-js-1-0-wpgraphql\/"},"author":{"name":"Jeff Everhart","@id":"https:\/\/wpengine.com\/builders\/#\/schema\/person\/b5a7f380738d25f57b00a5aaacf3db52"},"headline":"Moving to GET from POST Requests with Faust.js 1.0 &#038; WPGraphQL","datePublished":"2023-06-14T14:27:14+00:00","dateModified":"2023-07-14T13:34:06+00:00","mainEntityOfPage":{"@id":"https:\/\/wpengine.com\/builders\/moving-get-post-requests-faust-js-1-0-wpgraphql\/"},"wordCount":1665,"commentCount":0,"publisher":{"@id":"https:\/\/wpengine.com\/builders\/#organization"},"keywords":["Faust.js","WPGraphQL"],"articleSection":["Headless"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wpengine.com\/builders\/moving-get-post-requests-faust-js-1-0-wpgraphql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wpengine.com\/builders\/moving-get-post-requests-faust-js-1-0-wpgraphql\/","url":"https:\/\/wpengine.com\/builders\/moving-get-post-requests-faust-js-1-0-wpgraphql\/","name":"Moving to GET from POST Requests with Faust.js 1.0 & WPGraphQL - Builders","isPartOf":{"@id":"https:\/\/wpengine.com\/builders\/#website"},"datePublished":"2023-06-14T14:27:14+00:00","dateModified":"2023-07-14T13:34:06+00:00","breadcrumb":{"@id":"https:\/\/wpengine.com\/builders\/moving-get-post-requests-faust-js-1-0-wpgraphql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/builders\/moving-get-post-requests-faust-js-1-0-wpgraphql\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/builders\/moving-get-post-requests-faust-js-1-0-wpgraphql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/builders\/"},{"@type":"ListItem","position":2,"name":"Moving to GET from POST Requests with Faust.js 1.0 &#038; WPGraphQL"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/builders\/#website","url":"https:\/\/wpengine.com\/builders\/","name":"Builders","description":"Reimagining the way we build with WordPress.","publisher":{"@id":"https:\/\/wpengine.com\/builders\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/builders\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/wpengine.com\/builders\/#organization","name":"WP Engine","url":"https:\/\/wpengine.com\/builders\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/builders\/#\/schema\/logo\/image\/","url":"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/2024\/05\/WP-Engine-Horizontal@2x.png","contentUrl":"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/2024\/05\/WP-Engine-Horizontal@2x.png","width":348,"height":68,"caption":"WP Engine"},"image":{"@id":"https:\/\/wpengine.com\/builders\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/wpebuilders","https:\/\/www.youtube.com\/channel\/UCh1WuL54XFb9ZI6m6goFv1g"]},{"@type":"Person","@id":"https:\/\/wpengine.com\/builders\/#\/schema\/person\/b5a7f380738d25f57b00a5aaacf3db52","name":"Jeff Everhart","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/237d84b2a63acb8c427ba3246f9c5fc1b436aac578a5df421927c23b4fde45f5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/237d84b2a63acb8c427ba3246f9c5fc1b436aac578a5df421927c23b4fde45f5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/237d84b2a63acb8c427ba3246f9c5fc1b436aac578a5df421927c23b4fde45f5?s=96&d=mm&r=g","caption":"Jeff Everhart"},"description":"Jeff is a Senior Developer Advocate at WP Engine, focusing on educational resources that blend JavaScript and WordPress to support the Atlas headless WordPress platform and ecosystem.","url":"https:\/\/wpengine.com\/builders\/author\/jeff-everhartwpengine-com\/"}]}},"_links":{"self":[{"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/posts\/5315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/comments?post=5315"}],"version-history":[{"count":0,"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/posts\/5315\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/media?parent=5315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/categories?post=5315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/tags?post=5315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}