在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):octokit/graphql-schema开源软件地址(OpenSource Url):https://github.com/octokit/graphql-schema开源编程语言(OpenSource Language):JavaScript 81.8%开源软件介绍(OpenSource Introduction):graphql-schema
UsageValidationconst { validate } = require("@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. const { schema } = require("@octokit/graphql-schema");
schema.json; // JSON version
schema.idl; // IDL version Schema as Typesimport { 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
Update schema files (
See also
LICENSE |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论