Posted on

Kickstart your full stack GraphQL application with GRelDAL starter – II

In the previous post of this series, we tried out the GRelDAL starter and bootstrapped a simple application.

In this (and the next) post, we dig deeper into what is happening in the application, and then in the last two posts of the series, we will extend this application to build something more closely resembling a real world app.

Posted on

Uploading files to MongoDB GridFS via Apollo powered GraphQL API

GraphQL multi-part request spec outlines a specification for multipart form requests in GraphQL. Jayden Seric, the author of the spec, has also authored two libraries apollo-upload-client and apollo-upload-server which makes it effortless to integrate file uploads in Apollo Server.

GridFS is a simple file system abstraction on top of MongoDB. This facilitates storage of large files (beyond BSON document size limit) in mongo database.

This post outlines the minimal integration required to save the files uploaded through the GraphQL API to GridFS.

Continue reading Uploading files to MongoDB GridFS via Apollo powered GraphQL API

Posted on

Javascript Async/Await with arbitrary Thenables

Usage of C# inspired async/await syntax (Now a stage 4 proposal) is now fairly mainstream in javascript, and native support is available in major browsers and Node.

Most of the times we await on promises (typically returned from async functions), however, it is relatively less well known that await works on arbitrary thenables. By thenables we mean any object with a then function member.

This post covers this usage, and explores some scenarios where it can be interesting.

Continue reading Javascript Async/Await with arbitrary Thenables

Posted on

Decoupling your frontend development with gulp and http-proxy

In past developers have often relied on backend-specific toolchains for web application frontends. Some examples would be Rails asset pipeline or the legacy ant based toolchain for YUI. However recently node.js based tooling support for frontend technologies has significantly evolved and it is quite viable to use a node.js based toolchain for managing your frontend projects, even if the backend is not node.js, thus keeping the workflow decoupled from the backend.