babel-blade docs

babel-blade docs

  • Docs
  • API
  • Help
  • GitHub
  • Roadmap
  • Blog

›Introduction

Introduction

  • What is Babel-Blade?
  • The Double Declaration Problem

Usage/API

  • GraphQL Spec By Example

Getting Started

  • As a babel plugin
  • As a babel macro

What is Babel-Blade?

babel-blade is a babel plugin (or macro) that helps to generate graphql query strings inline and solves the double declaration problem in clientside GraphQL.

Try it out on ASTExplorer or Babel REPL

The quickest, zero-install way to try it out is on either:

  • astexplorer (with fragments)
  • or the Babel REPL (go to Plugins on the bottom left, and add babel-plugin-blade to get it working)

If you like it, head over to our Getting Started docs to see how to install the babel plugin in your app.

See 7 minute introductory videos

Here is the old (slightly out of date API) walkthrough on youtube.

Here is the new 7 minute lightning talk at React Boston with the motivation and context of Babel Blade: https://youtu.be/30wOsJOluA4?t=497

Here's a longer 25 minute talk at GraphQLNYC going through more of the API and the motivations behind what babel-blade is.

Official Emoji

It is the ⛸️. Basically when I explained this idea to coworkers they said "oh it's just inline GraphQL". My boss at the time liked inline skating, which is commonly known as Roller Blading, and so the name stuck.

Internal stucture

Here is a chart of how the package is set up:

test

The Double Declaration Problem →
  • Try it out on ASTExplorer or Babel REPL
  • See 7 minute introductory videos
  • Official Emoji
  • Internal stucture
babel-blade docs
Docs
Getting StartedAPI Reference
Community
Twitter
More
BlogGitHubStar
MIT License. Maintained by @swyx