프로젝트
GitHub에서 보기
octokit/graphql-schema
소개
GitHub’s GraphQL Schema with validation. Automatically updated.
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalgraphql-schema
GitHub’s GraphQL Schema with validation. Automatically updated.
Usage
Validation
import { validate } from "@octokit/graphql-schema";
const errors = validate(`
{
viewer {
login
}
}
`);
// errors is array. Contains errors if any
You can also load the current Schema directly as JSON or IDL.
import { schema } from "@octokit/graphql-schema";
schema.json; // JSON version
schema.idl; // IDL version
Schema as Types
import { graphql } from "@octokit/graphql";
import { Repository } from "@octokit/graphql-schema";
const { repository } = await graphql<{ repository: Repository }>(
`
{
repository(owner: "octokit", name: "graphql.js") {
issues(last: 3) {
edges {
node {
title
}
}
}
}
}
`,
{
headers: {
authorization: `token secret123`,
},
},
);
Local setup
git clone https://github.com/octokit/graphql-schema.git
cd graphql-schema
npm install
npm test
Update schema files (GITHUB_TOKEN requires no scope)
GITHUB_TOKEN=... npm run update
See also
- octokit/openapi – GitHub's OpenAPI specification with
x-octokitextension - octokit/webhooks – GitHub Webhooks specifications
- octokit/app-permissions – GitHub App permission specifications
LICENSE
관련 프로젝트 살펴보기
불러오는 중…