MIT License

项目介绍

graphiti-api/graphiti 是一个托管在 GitHub 上的开源项目,主要使用 Ruby 编写,采用 MIT License 许可证,目前获得 1.1k 个 Star、160 次 Fork。

仓库全名
graphiti-api/graphiti
开源许可证
MIT License
Star 数
1.1k
Fork 数
160
未关闭 Issue
50

README 摘要

Graphiti Graphiti sits on top of your models (usually ActiveRecord) and exposes them over a JSON:API-compliant interface. You define Resources instead of controllers and serializers, and get filtering, sorting, pagination, sparse fieldsets, statistics, and nested reads and writes across relationships, all over one endpoint. It's built on the JSON:API spec, which settles the decisions every API accumulates: response…

完整内容见 GitHub 原始 README 或本页 。

常见问题

graphiti 用什么语言开发?

主要使用 Ruby 编写,采用 MIT License 许可证,目前有 1.1k 个 Star。

graphiti 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 graphiti 的源码?

可以直接克隆仓库:git clone https://github.com/graphiti-api/graphiti.git,默认分支为 main;安装与运行步骤见仓库 README。

graphiti 最近还在维护吗?

仓库最近一次更新为 1 周前,当前有 50 个未关闭 Issue;Star 数为 1.1k,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Stylish Graph APIs

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
1403
价值分
688
活跃状态
活跃

语言占比

CSS
HTML
JavaScript
MDX
Ruby
Shell

Release

README

Graphiti

CI Gem Version Ruby Style Guide semantic-release: angular

discord guides

Graphiti logo

Graphiti sits on top of your models (usually ActiveRecord) and exposes them over a JSON:API-compliant interface. You define Resources instead of controllers and serializers, and get filtering, sorting, pagination, sparse fieldsets, statistics, and nested reads and writes across relationships, all over one endpoint.

It’s built on the JSON:API spec, which settles the decisions every API accumulates: response shapes, filtering, sorting, pagination, error formats, and how related data rides along. Your client layer speaks this protocol in return. It isn’t complicated, so client logic can be hand-rolled or you can use one of the many available libraries that work with the standard.

A Resource looks like this:

class EmployeeResource < ApplicationResource
  attribute :first_name, :string
  attribute :last_name, :string
  attribute :age, :integer

  has_many :positions
end

That Resource serves ?filter[age][gt]=30, ?sort=-age, ?page[size]=10, ?include=positions and more, without writing any of them. See graphiti.dev for the whole loop, or the example app for a full working API.

Documentation

Docs live at graphiti.dev and are rendered from this repo: the markdown is in /docs, and the Docusaurus site that serves it is in /website. Fixes and improvements are welcome (every page has an “Edit this page” link at the bottom, which makes opening a PR with a change easy).

To preview locally:

cd website
npm install
npm run start

Join the Discord

评论

暂无评论