@tsmirror/graphql
v0.0.2
Published
Toy Graphql generator based on @tsmirror/reflect
Downloads
5
Readme
@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))