0.0.0 • Published 1 year ago

@genql/sourcegraph v0.0.0

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

sourcegraph.com TypeScript API client

GraphQL client for sourcegraph.com with full TypeScript support

Installation

npm install @genql/sourcegraph

Docs

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

Example usage

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


client
  .query({ areExecutorsConfigured: true })
  .then((x) => console.log(JSON.stringify(x, null, 4)))



// query variables
let precise = false
let after = ''
let email = ''
let first = 3

client
  .query({
    authorizedUserRepositories: {
      __args: {
        after: after,
        email: email,
        first: first,
      },
      pageInfo: {
        endCursor: true,
        hasNextPage: true,
      },
      totalCount: {
        __args: {
          precise: precise,
        },
      },
    },
  })
  .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