Skip to main content

Rust X JS - Class vs Struct - A look at Rust Through JS Tinted Glasses

· 6 min read
Nick McLean
Maintainer of The Devoyage

Welcome Voyager!

Today I'd love to try taking a look at Rust through the perspective of a JavaScript (or TypeScript) developer. Rust's growing popularity is not only something to keep an eye on, but an excellent excuse to learn something new.

A JavaScript class is a syntax that allows you to define blueprints for creating objects. Compared to the Rust Programming Language, structs act in a similar way by providing a mechanism for defining custom data types that encapsulate related data fields.

Let's compare the similarities and differences between these two concepts so that we can better understand their respective roles and functionalities in programming languages. By examining their similarities, we can identify common principles that underlie both concepts, facilitating knowledge transfer between languages and enhancing our ability to leverage their features effectively. In the end, hopefully we can learn some Rust!

Keep in mind that this is mostly psuedo-code written to show quick comparisons. You may need to tweak it to get it to run!

Rust x JS Logo

Unlocking the Rusty Treasure Trove: Crafting Next-Gen APIs with 6 Powerhouse Crates!

· 12 min read
Nick McLean
Maintainer of The Devoyage

Welcome Voyager and thanks for joining!

Today, let's dive into the exciting world of using Rust for your next back end GraphQL Project! I'm super pumped to introduce you to some fantastic crates that can truly level up your development journey.

Isn't it awesome how Rust has been buzzing lately? And guess what? The excitement isn't dying down anytime soon! As someone who thrives on learning new languages and embracing their quirks, I can tell you firsthand that Rust is a ride worth hopping on, even if it's just for a quick spin. Exploring different languages not only expands your toolkit but also enriches your overall coding skills.

So, are you ready to embark on this Rust adventure with me? Let's have a blast exploring some top-notch crates that'll help you whip up a stellar GraphQL API in Rust! 🚀

feature image

Subgraph - A Rust Powered GraphQL API Generator

· 6 min read
Nick McLean
Maintainer of The Devoyage

Welcome Voyager.

Thank you for joining! Today, we're delving into Subgraph, a Rust-based GraphQL tool designed to simplify the creation of scalable backends.

Building applications can often feel overwhelming, especially when tackling server-side logic that requires scalability, security, and flexibility. Subgraph aims to ease this challenge by emphasizing data ownership and DevOps control.

With Subgraph, you retain control of your data and servers, allowing you to deploy according to your preferences. It serves as a vital layer in the stack, facilitating interaction with your rows, documents, tables, and more. Instead of focusing on architecting scalable backends, Subgraph enables you to dedicate your time to building interfaces around logically organized data.

The latest release, Subgraph v0.0.14, introduces exciting new features that bring this tool closer to being a comprehensive solution for your next application.

I'm thrilled to have you join us on this journey! It's important to note that Subgraph is currently in a pre-alpha release state and is not yet suitable for critical production environments. However, if you create something innovative, I'd love to hear about your experience!

feature image

Create an Instant Passkey/Auth Server with Subgraph

· 9 min read
Nick McLean
Maintainer of The Devoyage

Welcome, Voyager!

I am delighted to present a streamlined approach for integrating webauthn user authentication and authorization into your upcoming project.

In essence, we are implementing a passwordless registration and login system, offering a seamless authentication process for your users while fortifying the security of your servers.

Join us as we delve into the fundamentals of passkeys and explore the utilization of Subgraph as an Authentication Server for your current or prospective applications.

subgraph as passkey feature image

Subgraph v0.0.13 - Instant API Generation At Your Fingertips with Subgraph

· 8 min read
Nick McLean
Maintainer of The Devoyage

Welcome Voyager.

Embark on an epic journey as I unveil an exciting chapter in the realm of Automated API Generation using Subgraph!

This iteration, v0.0.13, not only marks a significant milestone but also welcome a wave of powerful new options that promise to redefine the way you craft APIs.

Picture this – the ability to spin up robust yet flexible APIs in only a few moments, freeing you to channel your focus where it truly matters: your business logic. With Subgraph at your helm, bid farewell to the intricacies of code logic and immerse yourself in the artistry of your unique digital ventures.

Today, the horizon expands, and you, fellow Voyager, are here to see it happen. Ready to dive into the extraordinary? Let's set sail!

Want to support `@the-devoyage/subgraph`?

feature image

Subgraph v0.0.9 - Instant GraphQL API - Joined Types and Guards

· 6 min read
Nick McLean
Maintainer of The Devoyage

Hello All! Thanks for Joining!

Today, I am super excited to share the most recent update for Subgraph, an application written in Rust that creates an Instant GraphQL API.

Here is the low down: Provide a simple configuration, spin it up, and send those network requests. Your API is running in minutes not months saving you time and money.

This dynamic application gets fed a configuration file to describe your data in order to instantly spin up a usable GraphQL Server. Version v0.0.9 takes a few huge steps to make your API even more powerful with Joins and Guards.

Let's take a look at the new features and write a quick API in order to demonstrate how Subgraph can benefit your next project.

Subgraph SQL

Three Fancy Bash Directory Jumpers to "Avoid The Path"

· 6 min read
Nick McLean
Maintainer of The Devoyage

Hello All, Thanks for Joining!

Today, I'd love to share a quick little bash script that helps you change directories quickly and easily. We will be trying our hardest to "Avoid The Path", meaning we won't be typing out lengthy paths when changing directories.

As developers, we are constantly jumping into and out of directories, spinning up environments in different locations, or even to grabbing a quick reference from another project. Doing such tasks from the command line usually provides power that a GUI just might not have, making it worth the effort to stay in the terminal.

So, let's take a look at some fancy ways to "avoid the path"!

Avoid The Path

Subgraph v0.0.8 - Instant SQL API with Subgraph

· 6 min read
Nick McLean
Maintainer of The Devoyage

Hello All, Thanks for Joining!

Today we are creating instant APIs around SQL Databases of various dialects with Subgraph, a proof of concept tool that is made to assist speedy API development.

All it takes to use subgraph is a config file that informs the service where your data is and what your data looks like. Define the config and start the API to create an instant API around your database.

With the latest release, v0.0.8, we are taking a look at the newly added support for a few dialects of SQL. In addition to Mongo and HTTP Data Sources, Subgraph now supports Postgres, MySQL, and SqLite. Let's take a minute and spin up a new API from scratch!

Subgraph SQL

Check out the repo!

Subgraph v0.0.7 - Instant Chat GPT GraphQL API

· 5 min read
Nick McLean
Maintainer of The Devoyage

Hello all -- Thanks for joining!

Today we are going to use the Chat GPT API to show off the newest release from the subgraph project, which is a tool built to help you start up a well rounded API in a matter of minutes.

The @The-Devoyage/subgraph project is a proof-of-concept implementation written in Rust for generating a dynamic API from a single configuration/schema. The subgraph allows you to define entities, data sources, and resolvers in a single TOML configuration.

The configuration specifies how the API should be generated around the data you need, existing or not. Subgraph generates CRUD operations from the entities you define and allows you to connect many data sources to a single API, including HTTP and MongoDB (SQL support coming in the future!). In this way, you can create an API in no time, which can be used to manipulate and find data, and even map third-party RESTful APIs to GraphQL automatically.

Let's dive into the new HTTP Data Source configurations which will allow us to connect to almost any third party RESTful API, such as the Chat GPT API.

Subgraph

Subgraph v0.0.5 - API vs. Car - Startups, What is an API and Why Generate?

· 6 min read
Nick McLean
Maintainer of The Devoyage

Hello all, and thanks for joining.

Today, we start a conversation about what an API does at a basic level while talking about the newest release of project Subgraph, a GraphQL API Generator built with Rust.

Your next startup idea will most likely resolve around tech; It's 2023! So before you set out to hire that next developer, it is important that you might understand some basics about the empire you are creating.

API Vs Car