New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

trifid-handler-fetch

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trifid-handler-fetch

Fetch handler for Trifid

latest
Source
npmnpm
Version
3.5.1
Version published
Maintainers
2
Created
Source

trifid-handler-fetch

This Trifid plugin exposes an endpoint where you can perform SPARQL queries against a dataset which is loaded from a URL.

The URL can be a local file or a remote resource.

At the start of the server, the dataset is loaded from the URL and stored in memory, using Oxigraph. The dataset is not updated automatically when the resource changes.

Usage

Add the trifid-handler-fetch package to your dependencies:

npm install trifid-handler-fetch

And update the Trifid configuration to something similar as shown in the example below.

Example

This example config uses The Big Bang Theory dataset:

plugins:
  # […]
  handler-fetch:
    module: "trifid-handler-fetch"
    paths: /query
    config:
      url: https://raw.githubusercontent.com/zazuko/tbbt-ld/master/dist/tbbt.nt
      contentType: application/n-triples
      baseIRI: http://example.com
      graphName: http://example.com/graph

Options

  • url: URL to the resource which contains the dataset
  • contentType: the format of the serialization. See below for the supported formats.
  • baseIRI: the base IRI to use to resolve the relative IRIs in the serialization.
  • graphName: for triple serialization formats, the name of the named graph the triple should be loaded to.
  • unionDefaultGraph: for triple serialization formats, if the triples should be loaded to the default graph or to the named graph specified in graphName. This impacts also the need or not to query a specific graph in SPARQL queries. Defaults to false.
  • queryLogLevel: the log level for the queries. Defaults to debug.

Supported formats:

  • Turtle: text/turtle or ttl
  • TriG: application/trig or trig
  • N-Triples: application/n-triples or nt
  • N-Quads: application/n-quads or nq
  • N3: text/n3 or n3
  • RDF/XML: application/rdf+xml or rdf

Keywords

trifid

FAQs

Package last updated on 26 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts