All Projects → smartvokat → esbuild-plugin-relay

smartvokat / esbuild-plugin-relay

Licence: MIT License
An esbuild plugin to transform tagged GraphQL template literals for Relay.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to esbuild-plugin-relay

rc-dynamic
React DnD component tree --- React 动态组件树 Demo
Stars: ✭ 14 (+0%)
Mutual labels:  esbuild
mimicsocks
just another TCP proxy
Stars: ✭ 14 (+0%)
Mutual labels:  relay
postfix-relay
Postfix SMTP relay docker image
Stars: ✭ 76 (+442.86%)
Mutual labels:  relay
atbuild
Use JavaScript to generate JavaScript
Stars: ✭ 26 (+85.71%)
Mutual labels:  esbuild
swifitch-software
Software for SWIFITCH HW
Stars: ✭ 12 (-14.29%)
Mutual labels:  relay
tangerine-monorepo
A "fast" TypeScript-based Node.js monorepo setup powered by esbuild & turborepo
Stars: ✭ 191 (+1264.29%)
Mutual labels:  esbuild
koa-server
🗄️ GraphQL Back-end Server with Relay, Koa, MongoDB and Mongoose
Stars: ✭ 31 (+121.43%)
Mutual labels:  relay
vite-plugin-relay
A vite plugin for Relay
Stars: ✭ 44 (+214.29%)
Mutual labels:  relay
subscription-graphql
Subscription POC with graphql and relay
Stars: ✭ 18 (+28.57%)
Mutual labels:  relay
rescript-react-boilerplate
An opinionated app shell for ReScript & React progressive web apps
Stars: ✭ 62 (+342.86%)
Mutual labels:  esbuild
relay-starter-kit
💥 Monorepo template (seed project) pre-configured with GraphQL API, PostgreSQL, React, Relay, Material UI.
Stars: ✭ 3,513 (+24992.86%)
Mutual labels:  relay
typegraphql-relay
Relay-compliant GraphQL server using TypeGraphQL and TypeORM boilerplate.
Stars: ✭ 55 (+292.86%)
Mutual labels:  relay
graphql-pynamodb
Graphene PynamoDB Integration
Stars: ✭ 63 (+350%)
Mutual labels:  relay
neko-relay-land
Neko Neko Relay 自定义隧道落地端
Stars: ✭ 28 (+100%)
Mutual labels:  relay
relay-compiler-plus
Custom relay compiler which supports persisted queries
Stars: ✭ 68 (+385.71%)
Mutual labels:  relay
esbuild-plugin-import-glob
A esbuild plugin which allows to import multiple files using the glob syntax.
Stars: ✭ 28 (+100%)
Mutual labels:  esbuild
react-relay-pokemon
Use React & Relay as your Pokedex!
Stars: ✭ 88 (+528.57%)
Mutual labels:  relay
AzuraRelay
A "relay in a box" containing a lightweight web application and Icecast servers that can connect to and relay an AzuraCast parent instance.
Stars: ✭ 20 (+42.86%)
Mutual labels:  relay
esbuild-svelte
An esbuild plugin to compile Svelte components
Stars: ✭ 163 (+1064.29%)
Mutual labels:  esbuild
Lith
WeeChat relay client
Stars: ✭ 32 (+128.57%)
Mutual labels:  relay

esbuild-plugin-relay

Continuous Integration

An esbuild plugin to transform tagged GraphQL template literals for Relay. Heavily inspired by babel-plugin-relay.

Features

  • Replaces graphql tagged template literals with imports to the artifacts generated by relay-compiler
  • Supports CommonJS and ESM module formats
  • Supports TypeScript projects
  • Optionally warns you about outdated operations and fragments

Caveat

This plugin uses string replacements and does not parse the source code. This means it will try to compile GraphQL literals even if they are commented out. If that does not fit your workflow, you'll need to use ESBuild + babel + babel-plugin-relay.

Installation

# Using NPM
npm install -D esbuild graphql esbuild-plugin-relay

# Using yarn
yarn add -D esbuild graphql esbuild-plugin-relay

Usage

// esbuild.config.js
import esbuild from "esbuild";
import relay from "esbuild-plugin-relay";

esbuild.build({
  // ...other options,
  plugins: [
    relay()
  ]
})

Acknowledgements

This plugin is based on the official babel-plugin-relay.

The Gist by Samuel Cormier-Iijima was a great starting point.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].