A GrAMPS data source is not a huge toolset — it’s just a way to organize your GraphQL data sources in such a way that they can easily be managed as separate packages, shared between different GraphQL servers, and independently maintained and tested.
Table of Contents
The Anatomy of a Data Source
Every GraphQL data source has five (5) main components:
- Main (GrAMPS) Object — combines the other components into a single object for use with GrAMPS
- Connector — where to get data + methods for accessing it
- Model — methods to make specific requests using the connector
- Schema — description of the fields and types returned by the GraphQL queries and mutations (see the GraphQL docs on schemas for more info)
- Resolvers — functions to map the model responses to GraphQL schemas (see the GraphQL docs on execution for more info)
Why Follow the GrAMPS Standard?
- Consistency
- Maintainability because different data source codebases have common structure
- Centralized data, distributed maintenance (one endpoint, many repos)
- Reusability — plug together community GrAMPS data sources with your own to build complex applications faster