All files / lib/src graphql.js

100% Statements 6/6
100% Branches 6/6
100% Functions 1/1
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17          143x 143x   18x   6x     118x      
import { parser, DocumentType } from './parser';
import { query } from './query-hoc';
import { mutation } from './mutation-hoc';
import { subscribe } from './subscription-hoc';
export function graphql(document, operationOptions) {
    if (operationOptions === void 0) { operationOptions = {}; }
    switch (parser(document).type) {
        case DocumentType.Mutation:
            return mutation(document, operationOptions);
        case DocumentType.Subscription:
            return subscribe(document, operationOptions);
        case DocumentType.Query:
        default:
            return query(document, operationOptions);
    }
}
//# sourceMappingURL=graphql.js.map