<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sul</title>
    <description>The latest articles on DEV Community by Sul (@sulcalibur).</description>
    <link>https://dev.to/sulcalibur</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1029427%2F9316a1b6-4746-4fb7-bdc7-c511d29812dd.jpeg</url>
      <title>DEV Community: Sul</title>
      <link>https://dev.to/sulcalibur</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sulcalibur"/>
    <language>en</language>
    <item>
      <title>Nuxt and WPGraphQL</title>
      <dc:creator>Sul</dc:creator>
      <pubDate>Sun, 19 Feb 2023 14:26:12 +0000</pubDate>
      <link>https://dev.to/sulcalibur/nuxt-and-wpgraphql-2h3m</link>
      <guid>https://dev.to/sulcalibur/nuxt-and-wpgraphql-2h3m</guid>
      <description>&lt;p&gt;I'm at a loss. I have tried for days going in circle and I feel like I am going crazy. I should explain I am mainly a designer that lives in Figma and I have been trying to get an understanding of Vue and Nuxt and thought of updating my portfolio, so please excuse me if I should like I have no idea :P&lt;/p&gt;

&lt;p&gt;I'm trying to pull in the contents of a WordPress headless CMS into a Nuxt3 site. I can get all of the content to show via &lt;code&gt;{{ data }}&lt;/code&gt; but I just can't seem to show simple things like the site title or a list of the five latest posts.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;https://test.cms.sulei.dev/graphql&lt;/code&gt; is the test GQL endpoint and seems ok from what I have tested.&lt;/p&gt;

&lt;p&gt;I have tried various ways to pull in the data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;nuxt-graphql-client&lt;/li&gt;
&lt;li&gt;nuxt-apollo&lt;/li&gt;
&lt;li&gt;usefetch&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is an example of the index page where I have tried to just show the Site Title from WP&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;div id="front-page" class="prose"&amp;gt;
    &amp;lt;h1 class="bg-gray"&amp;gt;Nuxt3 ❤️ GraphQL&amp;lt;/h1&amp;gt;
    &amp;lt;p&amp;gt;{{ getHeader.siteTitle }}&amp;lt;/p&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/template&amp;gt;

&amp;lt;script lang="ts" setup&amp;gt;
import { ref } from "vue";
import useQuery from "@nuxtjs/apollo";
import gql from "graphql-tag";

const siteTitle = ref("");
const siteTitleQuery = gql`
  query siteTitle {
    getHeader {
      siteTitle
    }
  }
`;

const { data } = await useAsyncQuery(siteTitleQuery);
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Literally &lt;strong&gt;ANY&lt;/strong&gt; guidance or a point in the right direction would be super helpful - Thank you 🤗&lt;/p&gt;

&lt;p&gt;Sul&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>nuxt</category>
      <category>javascript</category>
      <category>vue</category>
    </item>
  </channel>
</rss>
