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

/gql-typed-query-builder/

    Package Sidebar

    Install

    npm i gql-typed-query-builder

    Weekly Downloads

    0

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    34.5 kB

    Total Files

    21

    Last publish

    Collaborators

    • claudioluciano