nodeSolidServer / nodeSolidServer/node-solid-server
Proposal: graphql for retrieving, updating turtle documents
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 1.8k
- Fork
- 308
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng việc xem xét SPARQL API hiện có của repository và cách các tài liệu Turtle được truy xuất và cập nhật. So sánh các query và mutation GraphQL được yêu cầu với bề mặt API hiện tại, cơ chế xác thực và các biện pháp kiểm soát quyền riêng tư. Để được xem là hoàn tất, cần có phạm vi đã được thống nhất và kế hoạch triển khai cho hỗ trợ GraphQL, nhưng issue này không nêu tên tệp, bài kiểm thử hay thay đổi đầu tiên cụ thể.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- graphql
- Lĩnh vực
- api, backend
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 18/100