GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - gramps-graphql/data-source-openlibrary

BranchesTags
Open more actions menu

Latest commit

 

History

17 Commits
17 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
test
test
 
 
.babelrc
.babelrc
 
 
.codeclimate.yml
.codeclimate.yml
 
 
.editorconfig
.editorconfig
 
 
.eslintignore
.eslintignore
 
 
.eslintrc.json
.eslintrc.json
 
 
.gitignore
.gitignore
 
 
.npmrc
.npmrc
 
 
.prettierignore
.prettierignore
 
 
.travis.yml
.travis.yml
 
 
README.md
README.md
 
 
package.json
package.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

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

This is a minimal example and boilerplate for a GrAMPS data source. Inside, you’ll find:

  • Connector — how to access the data source (e.g. a REST API)
  • Model — methods to retrieve/modify data from the data source (e.g. a CRUD wrapper)
  • Schema — description 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

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://ibm.biz/graphql-data-source

Quickstart

NOTE: Replace all instances of YOUR_DATA_SOURCE_NAME with the actual name you want to use (e.g. data-source-companyname-datatype).

# Clone the repo
git clone [email protected]:gramps-graphql/data-source-base.git data-source-YOUR_DATA_SOURCE_NAME

# Move into it
cd data-source-YOUR_DATA_SOURCE_NAME/

# Change the remote repo
git remote set-url origin [email protected]:USER_OR_ORG/YOUR_REPO_NAME.git

# IMPORTANT: Make sure to edit the name, description, contributors, and 
# repository fields in package.json

# Install dependencies
yarn install

To Develop with Mock Data

Start the app with the following command:

# Develop with mock data
yarn mock-data

To Develop with Live Data

Once you’ve got your data source configured to load live data, you can enable live data in development:

# Develop with live data
yarn live-data

Notes for Developers

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

About

No description or website provided.

Topics

apollo-server-expressapollographqlgrampsgramps-data-sourcegraphqlgraphql-serveropen-library-api

Resources

Readme
Activity
Custom properties

Stars

2 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.