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 摘要。