This package makes it easy to push and retrieve schemas from graphql-schema-registry.
yarn add graphql-schema-registry-tooling
npm install graphql-schema-registry-tooling
Add config to your .env file
REGISTRY_URL=http://graphql-registry
REGISTRY_SERVICE_NAME=cart
REGISTRY_SERVICE_URL=http://cart
Add command to your package.json
graphql-schema-registry push src/schema.graphql
For more commands and options run
graphql-schema-registry help
Add the module import to your .ts file
import { retrieveSchemas } from "graphql-schema-registry-tooling";
Add command to your package.json
const serviceSchemas = await retrieveSchemas()