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

@bluelibs/nova

v1.8.1

Published

Nova is a relational query layer over MongoDB Node Drivers

Downloads

745

Readme

Nova is the fetching layer on top of MongoDB Node Driver, which allows SQL-comparable speeds for retrieving relational data.

GraphQL is treated as a first-class citizen, by offering ability to transform the GraphQL query into a Nova query. You do not have to use GraphQL to use this library.

The incredible speed boost is possible thanks to the technology called Hypernova, you can read more about it inside the documentation.

What does it solve?

  • It makes it a joy to use MongoDB as a relational database
  • Support for relational filtering & sorting
  • Speeds surpassing SQL in various scenarios
  • Lower bandwidth used than SQL for joined documents
  • Works with the default MongoDB Node Drivers
  • Super light-weight integration for GraphQL

Documentation

Click here to go to the documentation

Sample

import { query, manyToOne } from "@bluelibs/nova";

async function test() {
  const Post = await db.createCollection("Post");
  const Comments = await db.createCollection("Comments");

  manyToOne(Comments, Post, {
    // will automatically read from postId inside Comments
    linkName: "post",
    inversedLinkName: "comments",
  }); // also available manyToMany and manyToOne

  query(Post, {
    $: {
      filters: {
        isApproved: true
      }
    }
    title: 1,
    comments: {
      name: 1
    }
  })
}

GraphQL

import { query } from "@bluelibs/nova";

const Query = {
  // Automatically fetches everything in the minimum amount of queries
  users(_, args, ctx, info) {
    return query.graphql(Posts, info).fetch();
  },
};

Support

This package is part of BlueLibs family. If you enjoy this work please show your support by starring the main package. If not, let us know what can we do to deserve it, our feedback form is here