Skip to content

rconjoe/railway-node

Repository files navigation

railway-node

A Node.js client wrapper for Railway's GraphQL API.

Installation

npm install railway-node

Usage

Both commonJS and ESM are supported.

import { createClient, everything } from "railway-node";

async function main() {
  const client = createClient({
    url: "https://backboard.railway.com/graphql/v2",
    headers: {
      Authorization: "thecakeisalie",
    },
  });

  const result = await client.query({
    me: {
      id: true,
      email: true,
      // You can use the 'everything' helper for convenience
      // projects: {
      //   ...everything,
      // },
    },
  });

  console.log(result.me?.email);
}

main().catch(console.error);

Contributing

Sure, submit a PR.

License

MIT

About

A Node.js client wrapper for the Railway GraphQL API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published