Proposal: graphql for retrieving, updating turtle documents

Offen
#1,426 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
18/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
graphql
Bereich
api, backend

Rechercherichtung

Beginnen Sie mit der Überprüfung der bestehenden SPARQL API des Repositorys und der Art und Weise, wie Turtle-Dokumente abgerufen und aktualisiert werden. Vergleichen Sie die angeforderten GraphQL-Abfragen und -Mutationen mit der aktuellen API-Oberfläche, der Authentifizierung und den Datenschutzkontrollen. Für den Abschluss wären ein vereinbarter Umfang und ein Implementierungsplan für die GraphQL-Unterstützung erforderlich, aber dieses Issue nennt keine Dateien, Tests oder konkrete erste Änderung.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
Vorherrschende Sprache
JavaScript
Sterne
1.8k
Forks
308
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus nodeSolidServer/node-solid-server

Alle Issues in nodeSolidServer/node-solid-server

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.