1.0.3 • Published 5 years ago

gql-query-ninja v1.0.3

Weekly downloads
12
License
-
Repository
-
Last release
5 years ago

gql-query-ninja

Query builder for GraphQL

npm i gql-query-ninja

Features

  • Query, Mutation, Subscription
  • Nested fields
  • Merging different queries into one
  • Auto vars generating when using args
  • Composable API

Get Started

import { Query } from 'gql-query-ninja'

new Query('tasks')
  .args({
    taskId: {
      type: 'String',
    },
  })
  .fields({
    id: true,
    name: true,
    desc: true,
  })
  .build()

and as a result you will get:

query (
  $taskId: String!
) {
  tasks (
    taskId: $taskId
  ) {
    id
    name
    desc
  }
}

Examples

For more examples check out tests

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago