UNPKG

graphql-paper

Version:

A flexible in-memory store based on a GraphQL Schema

7 lines (6 loc) 386 B
import { DocumentStore, HooksMap, OperationMap, TransactionCallback } from '../types'; import { GraphQLSchema } from 'graphql'; export declare function transaction<T extends OperationMap>(store: DocumentStore, schema: GraphQLSchema, operations: T, hooks: HooksMap<T>, fn: TransactionCallback<T>): { eventQueue: Event[]; transactionResult: ReturnType<TransactionCallback<T>>; };