A Node.js client wrapper for Railway's GraphQL API.
npm install railway-node
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);
Sure, submit a PR.
MIT