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

@gramps/gramps

v4.4.0

Published

GraphQL Microservice Pattern Server

Downloads

142

Readme

GrAMPS — Composable, Shareable Data Sources for GraphQL

license npm version Build Status Maintainability Test Coverage Greenkeeper badge All Contributors

An easier way to manage the data sources powering your GraphQL server.

GrAMPS (short for GraphQL Apollo Microservice Pattern Server) is a thin layer of helper tools designed for the Apollo GraphQL server that allows independent data sources — a schema, resolvers, and data access model — to be composed into a single GraphQL schema, while keeping the code within each data source isolated, independently testable, and completely decoupled from the rest of your application.

Developer Quickstart

To get a GrAMPS+Apollo gateway up and running, start by installing the required packages:

yarn add @gramps/gramps apollo-server graphql

Next, create a file called index.js and put the following inside:

const gramps = require('@gramps/gramps').default;
const { ApolloServer } = require('apollo-server');

const getGraphQLServer = async () => {
	const GraphQLOptions = await gramps();

	const server = new ApolloServer({...GraphQLOptions});

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

getGraphQLServer();

Start the server with node index.js, then open http://localhost:4000/graphql to see the GraphQL Playground user interface.

For a more in-depth starter, see the 5-minute quickstart in our documentation.

Why Does GrAMPS Exist?

GrAMPS is an attempt to create a standard for organizing GraphQL data source repositories, which allows for multiple data sources to be composed together in a plugin-like architecture.

The ability to combine independently managed data sources into a single GraphQL server is a core requirement for IBM Cloud’s microservice architecture. We have dozens of teams who expose data, so a single codebase with all GraphQL data sources inside was not an option; we needed a way to give each team control of their data while still maintaining the ability to unify and expose our data layer under a single GraphQL microservice.

GrAMPS solves this problem by splitting each data source into independent packages that are composed together into a single GraphQL server.

Contributors

Thanks goes to these wonderful people (emoji key):

| Jason Lengstorf💻 🎨 📖 📢 | Eric Wyne💻 🤔 | Cory Cook🤔 | Michael Fix💻 | Ryan Mackey💻 | Mostafa Sholkamy💻 | | :---: | :---: | :---: | :---: | :---: | :---: |

This project follows the all-contributors specification. Contributions of any kind welcome!