0.1.2 • Published 5 years ago

@graphly/composer v0.1.2

Weekly downloads
-
License
-
Repository
github
Last release
5 years ago

@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