<?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: UncleZeze 🇿🇦</title>
    <description>The latest articles on DEV Community by UncleZeze 🇿🇦 (@hellozeze).</description>
    <link>https://dev.to/hellozeze</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%2F415539%2F746b7cd6-053c-4297-91f5-b3d480f61a69.jpeg</url>
      <title>DEV Community: UncleZeze 🇿🇦</title>
      <link>https://dev.to/hellozeze</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hellozeze"/>
    <language>en</language>
    <item>
      <title>Next.js 404 Issues</title>
      <dc:creator>UncleZeze 🇿🇦</dc:creator>
      <pubDate>Thu, 11 Feb 2021 08:09:56 +0000</pubDate>
      <link>https://dev.to/hellozeze/next-js-404-issues-ajk</link>
      <guid>https://dev.to/hellozeze/next-js-404-issues-ajk</guid>
      <description>&lt;p&gt;Hey devs!!&lt;/p&gt;

&lt;p&gt;I have a Next.js blog project. I have a page that is meant to render article content from a CMS. Querying the blog post data from the CMS works fine. The issue seems to be with Next.js specifically in that Next deems my page as non-existent. &lt;/p&gt;

&lt;p&gt;Below is a snippet pages directory structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pages/
-------article/
--------------[slug].tsx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Previously the article page was rendering with no issues. For some unfathomable reason, Next returns a 404 when I navigate to this page.&lt;/p&gt;

&lt;p&gt;I am using &lt;a href="mailto:next@9.5.3"&gt;next@9.5.3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any help will be appreciated&lt;/p&gt;

</description>
      <category>nextjs</category>
    </item>
    <item>
      <title>Processing .graphql extension in the Typescript compilation process.</title>
      <dc:creator>UncleZeze 🇿🇦</dc:creator>
      <pubDate>Wed, 15 Jul 2020 18:34:30 +0000</pubDate>
      <link>https://dev.to/hellozeze/processing-graphql-extension-in-the-typescript-compilation-process-32ek</link>
      <guid>https://dev.to/hellozeze/processing-graphql-extension-in-the-typescript-compilation-process-32ek</guid>
      <description>&lt;p&gt;I am working on a feature where I need to query a remote graphql api. Graphql-let generates the necessary typings based on the remote graphql schema. &lt;/p&gt;

&lt;p&gt;However, when I start my application (nextjs with a custom express server written in ts) the compilation process blows up when it comes across the .graphl extension. &lt;/p&gt;

&lt;p&gt;A beer is ready to be claimed by a champion who can resolve the riddle below...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; graphql-let

[ graphql-let ] Done nothing, caches are fresh.
[nodemon] 2.0.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): server/**/*
[nodemon] watching extensions: ts,js,graphql
[nodemon] starting `ts-node --project tsconfig.server.json server/index.ts`

/.../node_modules/typescript/lib/typescript.js:139148
                var error = new Error(`Could not find source file: '${fileName}'.`);
                            ^
Error: Could not find source file: '/.../lib/reviews/queries/getReviews.graphql'.
    at getValidSourceFile (/.../node_modules/typescript/lib/typescript.js:139148:29)
    at Object.getEmitOutput (/.../node_modules/typescript/lib/typescript.js:139533:30)
    at getOutput (/.../node_modules/ts-node/src/index.ts:562:32)
    at Object.compile (/.../node_modules/ts-node/src/index.ts:775:32)
    at Module.m._compile (/.../node_modules/ts-node/src/index.ts:858:43)
    at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Object.require.extensions.(anonymous function) [as .js] (/.../node_modules/ts-node/src/index.ts:861:12)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
[nodemon] app crashed - waiting for file changes before starting...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The offending piece of code is like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {
    GetReviewsDocument,
    useGetReviewsQuery,
} from "../reviews/queries/getReviews.graphql";

const reviews = () =&amp;gt; {
    try {
        const { data, error } = await useGetReviewsQuery({
            query: GetReviewsDocument
        });

        if (error) {
            console.log(`An error occurred while trying to fetch reviews. ${error.message}`);
        }

        console.log(`Success: ${JSON.stringify(data)}`);

    } catch (e) {
                    console.log(`An error occurred while trying to fetch reviews. ${e}`);
    }
});

export default reviews;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>typescript</category>
      <category>graphql</category>
      <category>nextjs</category>
      <category>tsnode</category>
    </item>
    <item>
      <title>React Hooks Noob, please help...</title>
      <dc:creator>UncleZeze 🇿🇦</dc:creator>
      <pubDate>Tue, 23 Jun 2020 20:02:02 +0000</pubDate>
      <link>https://dev.to/hellozeze/react-hooks-noob-3o7d</link>
      <guid>https://dev.to/hellozeze/react-hooks-noob-3o7d</guid>
      <description>&lt;p&gt;I have a sign up form that accepts basic username/password data. This needs to authenticate against a graphql endpoint using a custom hook. React Hooks rules dictate, you cannot call a hook within an event handler. How else can the custom hook be invoke to perform the authentication once the user submits the form?&lt;/p&gt;

</description>
      <category>react</category>
      <category>help</category>
    </item>
  </channel>
</rss>
