Converting My Portfolio to Vike SSG

With these new tools, the adjustment was simple.

My folder structure is updated to this:

/src
  /pages
    +Layout.vue
    /index
      +Page.vue
    /articles
      +Page.vue
      /articles/@articleSlug #dynamic route
        +data.js
        +Head.vue
        +onBeforePrerenderStart.js
        +Page.vue
        +route.js
        +title.js

Two item's I didn't include above are +onBeforePrerenderStart.js and +route.js.

These...

GraphQL - A Promise Unfulfilled

GraphQL seemed like such a great idea when I first learned about it

Essentially it's the reinvention of an API endpoint. Instead of hitting a specific API to get back a certain set of data, let's have one endpoint that will return what's requested.

For example instead of an endpoint to retrieve a user's data, typically /user, instead pointing to /graphql and making requests against that endpoint for what a developer would like...

Building a FastAPI + Strawberry (Graphql) Backend with Next.js 13 and React Server Components, Pt. 6 - Handling Data Responses with React Server Components

In the last post, I outlined how to instantiate Apollo Client between the server and client components in our application. The important takeaways were that each component type would need it's own Apollo Client instance and also that passing something like a bearer token between the two component types is possible using the cookie function as outlined in Next.js's documentation.

Of course, using cookies, or even local storage for that matter, is a very poor way of managing data, and...