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

@vaka-dummy/graphql-commons

v0.0.3

Published

## Overview

Downloads

3

Readme

GraphQL Common Package

Overview

The GraphQL Common package is a shared library based on the Apollo GraphQL server. It provides a set of common functionalities and utilities for building GraphQL APIs within the ecosystem, promoting code reusability and standardization.

Features

  • Built on Apollo GraphQL server: Leverages the capabilities of Apollo to create robust GraphQL APIs.
  • Serverless deployment support: Optimized for serverless architectures, allowing easy scaling and management.
  • MongoDB integration: Seamlessly integrates with MongoDB for efficient backend storage and data management.
  • Custom Scalars: Includes custom scalar types for enhanced data handling (e.g., DateTime).
  • Error Handling: Built-in error handling utilities for better error management across APIs.

Prerequisites

  • Node.js (version 18.x.x or higher)
  • MongoDB
  • Serverless framework (for deployment)
  • A basic understanding of GraphQL and its concepts

Installation

To install the package, run:

npm install @vaka-consulting/graphql-commons

Usage

Here's a basic example of how to use the Graphql Common package:

const { createServer } = require('@vaka-consulting/graphql-commons');

// Your schema and resolvers
const typeDefs = `...`;
const resolvers = {...};

const server = createServer({ typeDefs, resolvers });

server.listen().then(({ url }) => {
  console.log(`🚀 Server ready at ${url}`);
});

Configuration

The following environment variables must be set to configure the package:

  • DB_SERVER_NAME: The name of your MongoDB server.
  • DB_NAME: (Optional) The name of your MongoDB database, defaults to amplifi.
  • DB_URI: (Optional) The MongoDB URI for direct connection.

Ensure you load these variables in your application, preferably using a library like dotenv.

Deployment

This package is designed to be deployed in a serverless environment. Make sure you have the Serverless framework installed and configured.

To deploy, run the following command:

serverless deploy

Ensure that your serverless configuration file (serverless.yml) is properly set up to include the necessary functions, resources, and environment variables for your application.

Database

The package uses MongoDB as the backend database. Ensure you have a MongoDB instance set up and the connection string properly configured in your environment.

Contributing

Add information about how others can contribute to this project

License

Specify the license under which this package is released

Support

For any questions or issues, please open an issue on our GitHub repository.