Blog with a View: Update

"Bumpy roads lead to beautiful places"
- Senior Director @ Oracle 🧑💻
- #orclapex fan since '99 🛠️
- https://spendolini.blog 💻
- Oracle Ace Alumni ♠️
- Bleed Syracuse Orange 🍊
- Golf when I can ⛳️
- Austin, TX 🎸🍻
- Views are my own 🫢
Search for a command to run...

"Bumpy roads lead to beautiful places"
No comments yet. Be the first to comment.
I saw Dimitri's post on SQL Assertions today and it piqued my curiosity. Putting more business rules closer to data is almost always a great idea, as you can now call DML from any technology and rest

Almost 20 years ago to the date, I submitted my resignation to Oracle to go start my own company. It was a difficult decision to make, as APEX - or HTML DB as it was called then - was just starting to gain traction. However, I was presented with an o...

One of the more difficult parts of the software development lifecycle is deployment. While it seems simple on the surface - just write some scripts and run them - it gets pretty complicated pretty quickly as the level of sophistication of your system...

Another AI-centric tool that has raised a lot of interest is Claude Desktop. Like Cline, Claude Desktop uses the same reasoning engine at the core - Claude Code - to assist with development tasks. While they share the same engine, there are use cases...

When I first heard the term MCP used in the context of AI, I was immediately taken back to the 80s when the movie Tron was released. For those who have not seen it, Tron is a futuristic movie about a curious user who is literally sucked into a comput...

Apparently, Hashnode has updated its GraphQL API - so much so that the view in my old post - Blog with a View - is no longer accurate. It will still run, but it won’t return any data.
Fortunately, the fix is pretty simple. Use this view instead of the one mentioned in the post, and it should still work:
create or replace view blog_v
as
with json as
(
select
apex_web_service.make_rest_request
(
p_url=> 'https://gql.hashnode.com'
,p_http_method => 'POST'
,p_body => '{ "query" : "query Publication '
|| ' { publication(host: \"spendolini.blog\") '
|| ' { id title posts(first: 10) '
|| ' { edges '
|| ' { node '
|| ' { id title subtitle url slug brief publishedAt reactionCount responseCount content { markdown } coverImage { url } '
|| ' } '
|| ' } totalDocuments '
|| ' } '
|| ' } '
|| ' }" '
|| ' }'
) as val
from
dual
)
select
t.id
,to_timestamp(t.date_added, 'YYYY-MM-DD"T"HH24:MI:SS.FF"Z"') as date_added
,t.slug
,'https://spendolini.blog/' || t.slug as url
,t.title
,t.brief
,t.cover_image
,t.popularity
,t.total_reactions
,t.content
from
json,
json_table
(
json.val
,'$.data.publication.posts.edges.node[*]'
columns
(
id varchar2(1000) path '$.id'
,slug varchar2(1000) path '$.slug'
,title varchar2(1000) path '$.title'
,brief varchar2(1000) path '$.brief'
,cover_image varchar2(1000) path '$.coverImage.url'
,date_added varchar2(1000) path '$.publishedAt'
,popularity number path '$.popularity'
,total_reactions number path '$.reactionCount'
,content clob path '$.content.markdown'
)
) as t;
There’s also a new GraphQL Playground for Hashnode’s APIs that’s worth checking out.
Title Photo by David Kemptner-Rauscher on Unsplash