0.0.0 • Published 1 year ago

@genql/opencollective v0.0.0

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

opencollective.com TypeScript API client

GraphQL client for opencollective.com with full TypeScript support

Installation

npm install @genql/opencollective

Docs

You can read more about usage in the client docs and Genql docs

Example usage

import { createClient } from '@genql/opencollective'
const client = createClient()


// query variables
let channel
let format
let height = 3
let githubHandle = ''
let id = ''

client
  .query({
    account: {
      __args: {
        githubHandle: githubHandle,
        id: id,
      },
      activitySubscriptions: {
        __args: {
          channel: channel,
        },
        active: true,
        channel: true,
      },
      backgroundImageUrl: {
        __args: {
          format: format,
          height: height,
        },
      },
      categories: true,
    },
  })
  .then((x) => console.log(JSON.stringify(x, null, 4)))



// query variables
let format
let height = 3
let country
let hasCustomContributionsEnabled = false
let limit = 3
let offset = 3
let tagSearchOperator

client
  .query({
    accounts: {
      __args: {
        country: country,
        hasCustomContributionsEnabled: hasCustomContributionsEnabled,
        limit: limit,
        offset: offset,
        tagSearchOperator: tagSearchOperator,
      },
      limit: true,
      nodes: {
        backgroundImageUrl: {
          __args: {
            format: format,
            height: height,
          },
        },
        categories: true,
      },
      offset: true,
    },
  })
  .then((x) => console.log(JSON.stringify(x, null, 4)))

Sponsor

This project is sponsored by Notaku: Create public docs websites from your Notion pages

Notaku