1.8.3 • Published 3 years ago

@kaviar/nova v1.8.3

Weekly downloads
202
License
MIT
Repository
github
Last release
3 years ago

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 "@kaviar/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 "@kaviar/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 KaviarJS 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

1.8.3

3 years ago

1.8.2

3 years ago

1.8.1

3 years ago

1.8.0

3 years ago

1.7.3

3 years ago

1.7.2

3 years ago

1.7.1

3 years ago

1.8.0-alpha.1

3 years ago

1.7.8

3 years ago

1.7.7

3 years ago

1.7.6

3 years ago

1.7.5

3 years ago

1.7.4

3 years ago

1.7.0

3 years ago

1.6.2

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago