@commitspark/git-adapter
v0.20.0
Published
Interfaces for implementing Commitspark Git adapters
Readme
Introduction
Commitspark is a set of tools to manage structured data with Git through a GraphQL API.
This package provides interfaces that abstract away concrete Git repository storage locations from the Commitspark GraphQL API implementation. Use these interfaces to build a custom Git repository storage that is not already provided by one of the pre-built adapters offered by Commitspark.
Adapter Conventions
The following conventions should be applied in adapter implementations:
- File paths: In Git repositories, all Commitspark data should be stored under
commitspark/by default.- Schema storage: The GraphQL schema file should be stored under
commitspark/schema/schema.graphql. - Entry storage: Entries should be stored under
commitspark/entries/.
- Schema storage: The GraphQL schema file should be stored under
- Entry file type: Entry data should be stored using YAML files with extension
.yaml. - Errors: Adapters should throw known errors using the
GitAdapterErrorclass with one of the predefinedErrorCodevalues so that callers are able to handle errors meaningfully.
License
The code in this repository is licensed under the permissive ISC license (see LICENSE).
