Skip to main content

Posts

GraphQL variables in simple terms

GraphQL  has recently gained the attention of several companies. It’s essentially a query language for your API and provides a great developer experience. In previous blog posts, we learned about writing GraphQL  queries using the GitHub API explorer. If you are unsure what GraphQL queries are, I recommend reading  this article  first, before we get started on GraphQL variables. A GraphQL schema can contain more than just the scalar types. The two most used types are  query and mutation types . To learn more about defining types in a GraphQL schema, you can read our previous post  here . Getting started using GitHub’s public API To demonstrate and learn GraphQL variables, I am going to use the  GitHub API  that is available to the public. You can follow along by opening  https://developer.github.com/v4/explorer/ . Make sure you are signed in to your GitHub account to run the queries. The GitHub explorer is a great way to write an...

ES modules in Node today

Modules  are independent building blocks of a software program. They are basically a design pattern that implements features of  m odular design  in programming languages. The module system is supported in many languages and is quite popular since the way dependencies are handled, packaged, and managed determines how easy it is to work with a large and growing source code. In modular design, business logic pertaining to a particular feature or functionality is packaged (modularized) in a standardized format for reusability, flexibility, and for the sake of reducing complexity. This setup affords a loosely coupled system due to a smooth interface of communication, as there are no global variables or shared state. Although the concept of modules is  quite different depending on the language , they are akin to the idea of  namespaces  in languages like Java. Modules enable code organization by splitting a codebase into reusable components such that each ...