0.0.0 • Published 1 year ago
@shitty-scope-name/fly.io v0.0.0
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 and Genql docs})
Example usage
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
0.0.0
1 year ago