nodeSolidServer / nodeSolidServer/node-solid-server

Proposal: graphql for retrieving, updating turtle documents

未关闭
#1,426 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
JavaScript
星标
1.8k
派生
308
PR 合并指标
30 天内没有已合并 PR

描述

I know this might be a bit controversial (it is maybe seen as redundant burden) but it has some advantages:

1. search

Currently implementing a search would require to search all documents for the specific values to conform the sparql requirements. Implementing a search in graphql is very easy:
you tag every document with some metadata and can search through the metadata

2. custom actions (mutations)

The sparql Syntax allows just a limited set of operations. In graphql you can add Operations (mutations).
This might be handy for creating actions like "encrypt content for pod with public keys specified in pod" or "ping owner of pod".

3. privacy

Sparql searches are very expressive. This way it is harder to track which operations should be restricted and how to not leak metainformations. In graphql you can customize the search like in rest.

  • a solution would be to prefilter the query and only allow rdf operations on the filtered query

4. reuse libraries, simpler implementation

There are already some libraries for graphql which can be easily adapted for own needs. Also you can define which APIs you expose and how. This makes authentication easier and also allows triggers for events like: "document was queried".
Also it allows an bottom-up approach which is helpful for creating prototypes.

5. documentation

Graphql is self-documenting. You can have an autogenerated documentation.

Nomenclature

  • Document: a turtle file
  • SPARQL: typically used query language for rdf documents.
  • GraphQL: a query language created by facebook

Opinions?

Is there a way to extend sparql for supporting custom actions?

  • Yes there is a way

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先检查仓库现有的 SPARQL API,以及 Turtle 文档的获取和更新方式。将请求的 GraphQL 查询和变更与当前的 API 接口、身份验证和隐私控制进行比较。要视为完成,需要就 GraphQL 支持的范围和实施计划达成一致,但此 issue 没有指出文件、测试或具体的首次变更。

由索引模型根据 Issue 内容生成。

评估

技术栈
graphql
领域
api, backend
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
18/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。