@graphly/schema
TypeScript icon, indicating that this package has built-in type declarations

0.10.1 • Public • Published

@graphly/schema

Create GraphQL schema/source from typemap cache.

This package is a part of Graphly project and uses by @graphly/type to convert TypeScript classes to GraphQL schema.

Install

yarn add @graphly/schema

Usage

import {Project} from "@graphly/schema";
import {MySchema} from "./Schema/MySchema.ts"

async function main() {
    const project = await Project.from(MySchema.getSchemaLocation());
    
    // convert project to GraphQL format
    console.log(project.toGraphQL());
    
    // convert project to GraphQLSchema
    console.log(project.toSchema());
}

main();

Links

Read more about this project.

License

MIT

/@graphly/schema/

    Package Sidebar

    Install

    npm i @graphly/schema

    Weekly Downloads

    3

    Version

    0.10.1

    License

    none

    Unpacked Size

    219 kB

    Total Files

    183

    Last publish

    Collaborators

    • izatop