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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@bcgsc-pori/graphkb-schema

v4.1.1

Published

Shared package between the API and GUI for GraphKB which holds the schema definitions and schema-related functions

Readme

GraphKB Schema

codecov build npm version node versions DOI

This repository is part of the platform for oncogenomic reporting and interpretation.

This is the package which defines the schema logic used to create the database, build the API and GUI. It is a dependency of both the API and GUI and uses the parser package.

This is where all database constraints and swagger metadata associated with a particular database model is defined

schema

Deployment

This package is installed on our local npm server. To install simply add to your package.json as you would with any other package and supply the registry argument to npm install

Getting Started (For Developers)

Install the dependencies

npm install

Then run the tests

npm run test

Using with OrientJS

To avoid requiring orientjs in this package, the RID class is defaulted to the builtin String class. It is expected that if you want your RID strings cast to RID objects (orientjs.RID or orientjs.RecordID for orientjs 3.X.X) that you will patch this after import. For example

const {RID} = require('orientjs');
const {constants, schema} = require('@bcgsc-pori/graphkb-schema');

const {PERMISSIONS} = constants;

constants.RID = RID; // IMPORTANT: Without this all castToRID will do is convert to a string

Migrating from v3 to v4

To facilitate more reuseable typing schemes ClassModel and Property classes have been removed and now are simply objects. All interactions with these models should go through the schema class instead of interacting directly with the model and property objects. Return types are given only when they differ.

| v3 | v4 equivalent | | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | ClassModel._properties | ClassDefinition.properties | | ClassModel.properties | SchemaDefinition.getProperties(modelName: string) | | ClassModel.required | SchemaDefinition.requiredProperties(modelName: string) | | ClassModel.optional | SchemaDefinition.optionalProperties(modelName: string) | | ClassModel.getActiveProperties() | SchemaDefinition.activeProperties(modelName: string) | | ClassModel.inherits | SchemaDefinition.ancestors(modelName: string) | | ClassModel.subclasses: ClassModel[] | SchemaDefinition.children(modelName: string): string[] | | ClassModel.descendantTree(excludeAbstract: boolean): ClassModel[] | SchemaDefinition.descendants(modelName: string, opt: { excludeAbstract?: boolean, includeSelf?: boolean }): string[] [^1] | | ClassModel.queryProperties: Record<string,Property[]> | SchemaDefinition.queryableProperties(modelName: string): Record<string,PropertyDefinition[]> | | ClassModel.inheritsProperty(propName: string) | SchemaDefinition.inheritsProperty(modelName: string, propName: string) | | ClassModel.toJSON | N/A [^2] | | ClassModel.formatRecord(record: GraphRecord, opt = {}) | SchemaDefinition.formatRecord(modelName: string, record: GraphRecord, opt = {}) | | Property.validate(inputValue: unknown): unknown | validateProperty = (prop: PropertyDefinition, inputValue: unknown): unknown |

[^1]: must be called with includeSelf=true to match v3 edition [^2]: There is no need for this function now since the ClassDefinition object is effectively already a JSON object