gql-typed-query-builder
v0.0.2
Published
A simple query builder for GraphQL with TypeScript support
Downloads
2
Maintainers
Readme
GraphQL Query Builder
A simple helper function to generate GraphQL queries using plain JavaScript Objects.
But the cool part is it's have types :tada:
How to use
const query = graphql<Todo>({
name: 'todos',
fields: [
'id',
'name',
'complete'
]
})
console.log(query)
"query { todos { id name complete } }"
More examples: Tests
Ohh it's based on https://github.com/atulmy/gql-query-builder