# @shitty-scope-name/fly.io

> SDK client for fly.io GraphQL API

Latest version **0.0.0** (published 2022-11-29) · 0 weekly downloads

## Install

```sh
npm install @shitty-scope-name/fly.io
pnpm add @shitty-scope-name/fly.io
yarn add @shitty-scope-name/fly.io
bun add @shitty-scope-name/fly.io
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2022-11-29 |
| First published | 2022-11-29 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 1.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | xmorse |

## Links

- npm: https://www.npmjs.com/package/@shitty-scope-name/fly.io
- npm.io page: https://npm.io/package/@shitty-scope-name/fly.io

## Dependencies (2)

- [graphql](https://npm.io/package/graphql.md) ^16.0.0
- [isomorphic-unfetch](https://npm.io/package/isomorphic-unfetch.md) *

## Recent versions

- 0.0.0 (latest) — 2022-11-29

## README

# fly.io

GraphQl client for fly.io with full typescript support

## Installation

```
npm install @shitty-scope-name/fly.io
```

## Docs

You can read more about usage in the [client docs](https://genql.dev/clients/fly.io) and [Genql docs](https://genql.dev/docs)})

## Example usage

```js
import { createClient } from '@genql/fly.io'
const client = createClient()


// query variables
let id
let name

client
  .query({
    addOn: [
      {
        id: id,
        name: name,
      },
      {
        addOnPlan: {
          displayName: true,
          id: true,
          maxCommandsPerSec: true,
        },
        hostname: true,
        id: true,
      },
    ],
  })
  .then((x) => console.log(JSON.stringify(x, null, 4)))



// query variables
let after
let before

client
  .query({
    addOnPlans: [
      {
        after: after,
        before: before,
      },
      {
        edges: {
          cursor: true,
        },
        nodes: {
          displayName: true,
          id: true,
          maxCommandsPerSec: true,
        },
        pageInfo: {
          endCursor: true,
          hasNextPage: true,
          hasPreviousPage: true,
        },
      },
    ],
  })
  .then((x) => console.log(JSON.stringify(x, null, 4)))



// query variables
let name

client
  .query({
    addOnProvider: [
      {
        name: name,
      },
      {
        excludedRegions: {
          code: true,
          gatewayAvailable: true,
          latitude: true,
        },
        id: true,
        name: true,
      },
    ],
  })
  .then((x) => console.log(JSON.stringify(x, null, 4)))



// Mutations
// query variables
let id
let showCompleted
let appId
let hostname

client
  .mutation({
    addCertificate: [
      {
        appId: appId,
        hostname: hostname,
      },
      {
        app: {
          allocation: [
            {
              id: id,
            },
            {
              canary: true,
            },
          ],
          allocations: [
            {
              showCompleted: showCompleted,
            },
            {
              canary: true,
            },
          ],
          appUrl: true,
        },
        certificate: {
          certificateAuthority: true,
        },
        check: {
          aRecords: true,
          aaaaRecords: true,
          acmeDnsConfigured: true,
        },
      },
    ],
  })
  .then((x) => console.log(JSON.stringify(x, null, 4)))


```

## Sponsor

This project is sponsored by [Notaku](https://notaku.so)

[![Notaku](https://notaku.so/github_banner.jpg)](https://notaku.so)

---
_Source: https://npm.io/package/@shitty-scope-name/fly.io · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
