Skip to content

Benno

The easy, TypeScript-native library for writing Solid applications

Try it live

fetchProfile.ts
import { buildModel } from "benno";
import { foaf, space } from "rdf-namespaces";
import type { UrlString } from "@inrupt/solid-client";
const profileModel = buildModel()
.addProperty({
property: space.storage,
type: "url",
alias: "podRoot",
required: true,
})
.addProperty({
property: foaf.name,
type: "string",
alias: "name",
required: false,
});
async function fetchProfile(webId: UrlString) {
return profileModel.fetchOneFrom(webId);
}