inrupt / inrupt/solid-client-js

Fluent API for reading structured data

Open
#2,700 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
245
Forks
42
Avg merge
12h 49m
Merged PRs (30d)
22

Description

Search terms you've used
  • fluent
  • fluent api
Feature suggestion

A fluent API for reading data.

Currently there is only a fluent API for constructing data. But it would be also possible (and maybe more widely usable) to create a fluent API for reading data.
In fact, the current style is almost there, but just with the addition of introducing relevant methods to the relevant types, instead of chaining function calls.

Expected functionality/enhancement
  • Allow directly calling methods when reading structured data, instead of chaining function calls, to be more intuitive.
  • Relevant methods for dealing with potentially multiple values/objects of the same subject & predicate.
  • If the value is a URL (e.g. originally obtained by getUrl), allow "resolving" it as a Thing.
    • This may be provided in the first-level as well, saving the potential duplication of getSolidDataset.
    • Of course, corner-cases may need to be handled.
      • In particular, what if the current dataset already has triples of that URL (as subject)? That's why "resolving" (by fetching the dataset matching that URL) should not be the default behaviour. Maybe should also provide a method/function to "merge" the two datasets.
Use Cases

Easier development.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reviewing the existing fluent API for constructing structured data and the current reading methods; completion would require an agreed fluent reading API covering repeated values, URL resolution, and dataset-merging corner cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.