All Projects → gramps-graphql → Data Source Base

gramps-graphql / Data Source Base

Boilerplate for creating a GrAMPS-compatible data source.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Data Source Base

Apollo Server
🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.
Stars: ✭ 12,145 (+23255.77%)
Mutual labels:  graphql, graphql-server, apollographql
Ultimate Backend
Multi tenant SaaS starter kit with cqrs graphql microservice architecture, apollo federation, event source and authentication
Stars: ✭ 978 (+1780.77%)
Mutual labels:  graphql, graphql-server, boilerplate
Graphql Log
Add logging to your GraphQL resolvers so you know what's going on in your app.
Stars: ✭ 94 (+80.77%)
Mutual labels:  graphql, graphql-server, apollographql
Gramps Legacy
The core data source combination engine of GrAMPS.
Stars: ✭ 198 (+280.77%)
Mutual labels:  graphql, graphql-server, apollographql
Rails Devise Graphql
A Rails 6 boilerplate to create your next Saas product. Preloaded with graphQL, devise, JWT, CanCanCan, RailsAdmin, Rubocop, Rspec, i18n and more.
Stars: ✭ 199 (+282.69%)
Mutual labels:  graphql, graphql-server, boilerplate
Create Graphql
Command-line utility to build production-ready servers with GraphQL.
Stars: ✭ 441 (+748.08%)
Mutual labels:  graphql, graphql-server, boilerplate
Graphql Up
Get a ready-to-use GraphQL API for your schema
Stars: ✭ 415 (+698.08%)
Mutual labels:  graphql, graphql-server, apollographql
Pup
The Ultimate Boilerplate for Products.
Stars: ✭ 563 (+982.69%)
Mutual labels:  graphql, graphql-server, boilerplate
Howtographql
The Fullstack Tutorial for GraphQL
Stars: ✭ 7,999 (+15282.69%)
Mutual labels:  graphql, apollographql
Orionjs
A new framework for serverside GraphQL apps
Stars: ✭ 35 (-32.69%)
Mutual labels:  graphql, graphql-server
Relay Fullstack
☝️🏃 Modern Relay Starter Kit - Integrated with Relay, GraphQL, Express, ES6/ES7, JSX, Webpack, Babel, Material Design Lite, and PostCSS
Stars: ✭ 986 (+1796.15%)
Mutual labels:  graphql, boilerplate
Graphql Modules
Enterprise Grade Tooling For Your GraphQL Server
Stars: ✭ 962 (+1750%)
Mutual labels:  graphql, graphql-server
Fullstack Graphql
🌈 Simple Fullstack GraphQL Application. API built with Express + GraphQL + Sequelize (supports MySQL, Postgres, Sqlite and MSSQL). WebApp built with React + Redux to access the API. Written in ES6 using Babel + Webpack.
Stars: ✭ 955 (+1736.54%)
Mutual labels:  graphql, graphql-server
Graphql
Haskell GraphQL implementation
Stars: ✭ 36 (-30.77%)
Mutual labels:  graphql, graphql-server
Link state demo
🚀 Demonstrate how to support multiple stores in Apollo Link State
Stars: ✭ 30 (-42.31%)
Mutual labels:  graphql, apollographql
Niklick
Rails Versioned API solution template for hipsters! (Ruby, Ruby on Rails, REST API, GraphQL, Docker, RSpec, Devise, Postgress DB)
Stars: ✭ 39 (-25%)
Mutual labels:  graphql, boilerplate
Catalyst
Typescript NodeJS Microservices Boilerplate with Generator CLI - Moleculer, GraphQL, REST, OAuth2, Jaeger, Grafana, Prometheus, Ory Hydra, Ory Keto w/ Access Control middleware, Moleculer-DB GraphQL mixin, Pug, Redis, sibling client repo (login, persistance layer, react-native-web, ios, android)
Stars: ✭ 30 (-42.31%)
Mutual labels:  graphql, boilerplate
Graphqldockerproxy
A generic Graphql API for Docker and Kubernetes
Stars: ✭ 38 (-26.92%)
Mutual labels:  graphql, graphql-server
Apollo Angular
A fully-featured, production ready caching GraphQL client for Angular and every GraphQL server 🎁
Stars: ✭ 1,058 (+1934.62%)
Mutual labels:  graphql, apollographql
Githunt React
[DEPRECATED] 🔃 An example app frontend built with Apollo Client and React
Stars: ✭ 1,036 (+1892.31%)
Mutual labels:  graphql, apollographql

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

GrAMPS GraphQL Data Source Base

Build Status Maintainability Test Coverage npm version Greenkeeper badge

A boilerplate and minimal example for a GrAMPS data source.

Quickstart

Set up a local data source in seconds with:

# 💥 zero dependencies! no global installs! create a new data source
npx graphql-cli create -b gramps-graphql/data-source-base data-source-mydata

# 📂 move into the newly-created data source
cd $_

# 🚀 start the GraphQL Playground with your spankin’ new data source
yarn dev

NOTE: We recommend prefixing data source projects with data-source- for clarity and the eventual support of CLI tools to add data sources to your gateway. So if you’re creating a user management data source for the Acme company, we recommend data-source-acme-users or data-source-acmeusers as a directory/repo name.

ALSO NOTE: $_ is a handy shortcut for using the last argument passed to the previous command. It also does other stuff, but that's a rabbit hole for another time.

After running yarn dev, you’ll see a message with URLs for the GraphQL gateway and the GraphQL Playground. Open the Playground link (usually http://localhost:8080/playground if you don’t already have something running on port 8080), then run a query:

{
    getById(id: 123) {
        id
        name
        lucky_numbers
    }
}

To Develop with Mock Data

Add the --mock flag to enable mock data, which is helpful for working offline.

# Start the gateway with mock data
yarn dev --mock

See src/mocks.js to modify your mock resolvers.

NOTE: For more information on the GrAMPS CLI and its available options, check out the docs.

To Run the Tests

GrAMPS data sources start you off with 100% test coverage so you can build high-reliability GraphQL servers without a bunch of setup work.

Run the tests with:

yarn test

What's Inside?

Inside, you’ll find:

  • Schema — type definitions for GraphQL to interpret the data (see the GraphQL docs on schemas)
  • Resolvers — functions to map the results of calls to model methods to the schema
  • Mock Resolvers — mock functions for offline development
  • Context — an object with methods to interact with data that is passed to resolver functions

Each file contains a TODO comment explaining the changes you’ll need to make to create a working data source.

The goal of this repo is to provide enough code to allow a working example of a data source and its related tests, but to limit how much boilerplate needs to be edited to get your own data source implemented.

Code Quality and Continuous Integration

To help ensure a reliable, easy-to-maintain data source, this example also includes:

  • Configuration for Travis CI (for automated testing) and Code Climate (for quality analysis)
  • Starts you off right with test coverage at 💯
  • Provides testing helpers for common resolver testing patterns
  • Comes with docs! https://gramps.js.org/data-source/data-source-overview/

Notes for Developers

Currently, there is no watch capability (PRs welcome!), so the service needs to be stopped (control + C) and restarted (yarn dev) to reflect new changes to the data source.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].