0.0.0 • Published 2 years ago
@genql/sourcegraph v0.0.0
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
0.0.0
2 years ago