vscode-apollo-relay
vscode-apollo-relay copied to clipboard
Get rid of need for dependencies.ts
This is going to go wrong more than once, so we should replace it with something transparent.
The simplest approach looks to be to write code as normal, e.g.:
import { visit } from "graphql"
But then after compiling it we run an additional babel transform or sed script that rewrites it to:
const { visit } = require("./graphql")
…where ./graphql
is a module that does the dance to get vscode-apollo’s node_modules.