Skip to main content

How GraphQL Works

This is intended to be a very basic high level overview of GraphQL, explained to a developer that already understands the basics of REST API design. This is not a deep dive into all GraphQL's features or a GraphQL pros/cons list. Also, while GraphQL is backend language agnostic, this guide will be mentioning JavaScript implementations (since that's what I work with).

ESLint Violations as Warnings in VS Code

If you're using TypeScript and ESLint in VS Code, wip files or legacy files can quickly explode into a sea of red squiggles, making it hard to know where to start or track what's going on.

I like to hone in on type errors first, since they're typically more critical (as in, type errors will often completely crash your code). I keep those as scary red squiggles and tone ESLint down a bit by changing all its squiggles to just (orange) warnings.

This is easy to do with a quick edit to your user settings JSON file (accessed via the >Preferences: Open User Settings (JSON) command in VS Code):

"eslint.rules.customizations": [
{ "rule": "*", "severity": "warn" },

Use @link JSDoc comments

Use {@link VarName} in JSDoc comments when referencing variables or types to get:

  • "Rename Symbol" support in VS Code
  • "Go to Definition" support in VS Code
  • "Find All References" support in VS Code
  • generated doc links to the original reference (in packages like typedoc)

I assume that all the features in VS Code are driven by the TypeScript Language Server and thus are applicable to any editor that utilizes that same language server.

Docusaurus Problems

Day 1 of using Docusaurus and I'm already pretty disappointed in it. Maybe someone knows how to solve these problems, but online searches and Docusaurus's own documentation has yet to turn up solutions.