Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

JWT Authorization In A GraphQL API Using Golang

If you’ve been keeping up, you’ll remember I released a very popular tutorial titled, Getting Started with GraphQL Using Golang which was more or less a quick-start to using GraphQL in your web applications. Since then, I demonstrated an alternative way to work with related data in a tutorial titled, Maintain Data Relationships Through Resolvers with GraphQL in a Golang Application. Both articles are great, but they left out an important feature that most modern APIs must have. Most modern APIs must have a way to authorize particular users to access only certain pieces of data and not all data offered by the service.

One of the most popular ways to enforce some kind of authorization in an application is through the use of JSON web tokens (JWT). Users authenticate with a service and the service responds with a JWT to be used in every future request so that way the password is kept safe. The service can then validate the JWT to make sure it is correct and not expired.

We’re going to see how to protect particular GraphQL properties as well as entire queries using JSON web tokens and the Go programming language.

Read More

Protect GraphQL Properties With JWT In A Node.js Application

So you started playing around with GraphQL and Node.js. Did you happen to get up to speed with my previous tutorial titled, Getting Started with GraphQL Development Using Node.js? Regardless on how you’ve jumped into GraphQL, you’re probably at a time where you need to figure out how to protect certain queries or pieces of data from the general public through some kind of permissions or roles.

When building a RESTful API, the common approach to endpoint protection is with JSON web tokens (JWT). In fact, I even wrote a previous tutorial on the subject, but how does that have relevance to GraphQL?

We’re going to take the common JWT approach and apply it towards protecting queries as well as particular pieces of data in a GraphQL API created with Node.js.

Read More

Including Attractive Charts In Your Angular Web Application

It’s probably obvious, but most modern applications crave data and in many of those scenarios, being able to visualize the data is a necessity. This is where charting and graphs become valuable within frontend applications. Having attractive charts in your application can make a world of difference and with a convenient library like Chart.js, it isn’t complicated.

If you’ve been keeping up, you’ll remember I wrote a tutorial titled, Use Chart.js to Display Attractive Charts in a Vue.js Web Application which focused on Vue.js. This time around we’re going to see how to include charts in an Angular web application.

Read More

Getting Started With GraphQL Development Using Node.js

I’ve been playing around with GraphQL for a little over a month now, just to see if it is worth all the buzz it has been getting when it comes to modern API development. I must say that the more I use it, the more I’m coming to like it.

I recently wrote a few tutorials around getting started with GraphQL using Golang, but being the polyglot that I am, I wanted to see how difficult it would be to accomplish the same in something else, like Node.js. After having made an attempt, I found that it really isn’t any different as it is the same concept, just a different language.

We’re going to see how to get started with developing a web application with Node.js that can be queried with GraphQL rather than the traditional RESTful API endpoint approach.

Read More

TPDP Episode #18: Progressive Web Application Development

I’m pleased to announce that the latest episode of The Polyglot Developer Podcast, titled Progressive Web Application Development has been published to all of the major podcast networks.

In this episode, which is the eighteenth on the show, I’m joined by Tara Manicsic who is a Google Developer Expert (GDE) and works for Progress Software, the company behind Kendo UI. We discuss everything from where applications are headed and how they can function effectively as PWAs.

Read More

Maintain Data Relationships Through Resolvers With GraphQL In A Golang Application

I recently wrote about getting started with GraphQL in a Golang application, where I discussed the creation of schemas, executing queries, and mutating data, even though it was all mock data. In this example there were queries for related data, but they were constructed in a very independent form.

We’re going to see how to query for related data, similar to what you’d find in a JOIN operation on a relational database, but using GraphQL and the Go programming language.

Read More

Getting Started With GraphQL Using Golang

I’ve been hearing increasing amounts of buzz around GraphQL, a technology that has been around for quite a few years now. In case you’re not familiar, it is a technology for querying API data from a client-front end without having to make numerous requests or receiving unimportant data, both of which may cause negative affects on network latency.

Think of trying to query a relational database. Ideally you write a SQL query for the data you want and you do it in a single request. GraphQL tries to accomplish the same, but from an API consumption level.

We’re going to see how to implement a web application using the Go programming language, but uses GraphQL when working with the data.

Read More