0.1.2 • Published 5 years ago
@graphly/composer v0.1.2
@graphly/composer
Compose GraphQL schema with TypeScript reflection.
This package is a part of Graphly project and uses by
@graphly/type
to convert TypeScript classes to GraphQL schema.
Install
yarn add @graphly/composer
Usage
import {Composer} from "@graphly/composer";
const composer = new Composer({
basePath: __dirname,
schemaPath: "Schema/TestSchema.ts",
verbose: false,
});
const project = composer.compose();
// convert project to GraphQL format
console.log(project.toGraphQL());
// convert project to GraphQLSchema
console.log(project.toSchema());
Links
Read more about this project.
License
MIT