2.1.0 • Published 7 months ago

graphql-batch-mutation v2.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

graphql-batch-mutation

A utility package for building batched GraphQL mutations. This package helps you combine multiple GraphQL mutations into a single request, improving performance and reducing network overhead.

Installation

npm install graphql-batch-mutation

Usage

import { buildBatchMutation, Operation, OperationVariable } from 'graphql-batch-mutation';

const { graphql, variables } = buildBatchMutation([
  Operation('createUser(input: { name: $name })', {
    name: OperationVariable('String!', 'John Doe'),
  }),
  Operation('updateUser(input: { id: $id, name: $name })', {
    id: OperationVariable('ID!', '123'),
    name: OperationVariable('String!', 'John Doe'),
  }),
]);
2.1.0

7 months ago

2.0.2

7 months ago

2.0.1

7 months ago

2.0.0

7 months ago

1.1.1

7 months ago

1.1.0

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago