gql-typed-query-builder
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

GraphQL Query Builder

A simple helper function to generate GraphQL queries using plain JavaScript Objects.

But the cool part is it's have types 🎉

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    1

Package Sidebar

Install

npm i gql-typed-query-builder

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

34.5 kB

Total Files

21

Last publish

Collaborators

  • claudioluciano