@tsmirror/graphql
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

@tsmirror/graphql

Generate graphql from typescript types.

Usage

interface Jedi {
    master: Jedi,
    name: string | null,
    fullyTrained: boolean
}

const APIDefinition = {
    queries: {
        jedis: (limit = 50): Jedi[] => limit > 10 ? []:[]
    },
    mutations: {
        createJedi: (j: Jedi) => j
    }
}
const {client, schema} = graphql(reflected(APIDefinition))

Readme

Keywords

none

Package Sidebar

Install

npm i @tsmirror/graphql

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

60.7 kB

Total Files

15

Last publish

Collaborators

  • aenario