npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@comake/solid-dgraph

v3.1.5

Published

A dgraph database backend for a Community Solid Server

Downloads

40

Readme

Dgraph database backend extension for the Community Solid Server

Store data in your Solid Pod with a Dgraph Database.

Disclaimer

The schema and queries within this repository are built with the assumption that your Dgraph instance uses a custom fork of Dgraph where the predicate list feature has been re-added. This is so that we can query for any arbitrary/dynamic predicates a node may have. unigraph-dev/dgraph is an example where expand(_userpredicate_) can be used to fetch all the predicates a node has. It was used to develop this repo.

How to use Solid Dgraph

Install

From the npm package registry:

mkdir my-server
cd my-server
npm install @solid/[email protected] @comake/solid-dgraph

Configure

In your my-server folder (or whatever the name of your project is):

Create a config.json file from this template, and fill out your settings. The only important changes to make to the default config are to add solid-dgraph into @context and change the backend to dgraph:

-"files-scs:config/storage/backend/*.json",
+"files-csd:config/storage/backend/dgraph.json",

Optionally, you can change the connection settings for your Dgraph database by adding parameters to the DgraphDataAccessor in the @graph section such as:

{
  "@id": "urn:solid-dgraph:default:DgraphDataAccessor",
  "comment": "The configuration to connect to the Dgraph instance.",
  "DgraphDataAccessor:_configuration_connectionUri": "https://mySpecialConnectionUri",
  "DgraphDataAccessor:_configuration_grpcPort": "1234",
}

If you do not include this section, connectionUri defaults to localhost and grpcPort defaults to 9080, which are the Dgraph defaults.

Run

Execute the following command:

npx community-solid-server -c config.json -m .

Or add the command to scripts inside your package.json like so:

{
  "scripts": {
    "start": "npx community-solid-server -c config.json -m ."
  }
}

How to contribute to Solid Dgraph

Execute the following commands:

git clone https://github.com/comake/solid-dgraph.git
cd solid-dgraph
npm ci

TODO

  • [ ] Add separate unit tests for DgraphClient.ts and mock it in the tests for DgraphDataAccessor
  • [ ] Add option to create secure connection to Dgraph (i.e. instead of grpc.credentials.createInsecure())
  • [ ] Integration tests

License

©2022-present Comake, Inc., MIT License