https://github.com/remorses/fly-node-api
Type safe client for the Fly.io Graphql API
https://github.com/remorses/fly-node-api
Last synced: 7 months ago
JSON representation
Type safe client for the Fly.io Graphql API
- Host: GitHub
- URL: https://github.com/remorses/fly-node-api
- Owner: remorses
- Created: 2022-04-16T16:40:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-16T17:42:11.000Z (over 3 years ago)
- Last Synced: 2024-05-02T02:10:29.665Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 134 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
## Install
```
npm i fly-node-api
```
## Usage
```ts
import 'dotenv/config'
import { createClient } from 'fly-node-api'
const client = createClient({
headers: {
Authorization: `Bearer ${process.env.TOKEN}`,
},
})
async function main() {
const res = await client.query({
app: [
{ name: 'my-app' },
{
secrets: { name: true },
status: true,
},
],
})
console.log(res.app)
}
main()
```