Skip to main content

Data Servers

The dataServers config passed to the semantic data provider describes the servers to which we want to connect and what they contain. These information can be guessed from the various plugins we provide.

Example

const dataServers = {
server1: {
name: 'Server 1',
baseUrl: 'http://localhost:3000',
default: true,
authServer: true,
sparqlEndpoint: 'http://localhost:3000/sparql',
containers: [
{
path: '/users'
types: ['foaf:Person']
}
]
}
};

Properties

PropertyTypeDefaultDescription
baseUrlStringrequiredBase URL of the storage
nameStringName of the storage. Can be used by components and hooks.
defaultBooleanfalseIf true, is marked as the default server
authServerBooleanfalseIf true, the server is the one against which the user is authenticated
podBooleanfalseIf true, the server is a Solid storage
sparqlEndpointStringIf defined, the data provider will use it by default when fetching list of data
containersArrayArray of containers in the storage. See below for more information.

Container properties

The containers property of the data server is an array of objects with the following properties:

PropertyTypeDefaultDescription
pathStringrequiredPath of the container, relative to the baseUrl of the storage
typesStringClasses accepted in the container. If a prefix is used, it will be turned to an URI.
labelObjectAn object with the language as the key, and the name of the container as the value
labelPredicateStringThe predicate to use for the label of the contained resources.
shapeTreeUriStringURL of the shape tree associated with the container.
uriStringIf not provided, will be automatically calculated based on the path and the baseUrl
serverStringIf not defined, will automatically be set on the key of the storage