在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):graphql-js/graphene开源软件地址(OpenSource Url):https://github.com/graphql-js/graphene开源编程语言(OpenSource Language):TypeScript 99.7%开源软件介绍(OpenSource Introduction):Graphene-JSGraphene-JS is a JS framework for building GraphQL schemas/types fast and easily.
Check also the architecture docs to see how Graphene-JS is architected to ease the development of GraphQL in JS. IntegrationsGraphene has multiple integrations with different frameworks:
Also, Graphene is fully compatible with the GraphQL spec, working seamlessly with all GraphQL clients, such as Relay, Apollo and urql. InstallationFor instaling graphene, just run this command in your shell npm install --save graphene-js
# or
yarn add graphene-js ExamplesHere is one example for you to get started: import { ObjectType, Field, Schema } from "graphene-js";
@ObjectType()
class Query {
@Field(String)
hello() {
return "Hello world!";
}
}
const schema = new Schema({ query: Query }); Then Querying query = `
query SayHello {
hello
}
`;
var result = schema.execute(query); If you want to learn more, you can also check the documentation or check the provided examples:
ContributingAfter cloning this repo, ensure dependencies are installed by running: yarn After developing, the full test suite can be evaluated by running: yarn test You can also get the coverage with: yarn test --coverage DocumentationThe documentation is generated using the excellent Sphinx and a custom theme. The documentation dependencies are installed by running: cd docs
pip install -r requirements.txt Then to produce a HTML version of the documentation: make html |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论