File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 1+ import { ValidationContext } from 'graphql' ;
2+ import QueryComplexity from './QueryComplexity.js' ;
3+ import { QueryComplexityOptions } from './QueryComplexity.js' ;
4+
5+ export function createComplexityRule (
6+ options : QueryComplexityOptions
7+ ) : ( context : ValidationContext ) => QueryComplexity {
8+ return ( context : ValidationContext ) : QueryComplexity => {
9+ return new QueryComplexity ( context , options ) ;
10+ } ;
11+ }
Original file line number Diff line number Diff line change 11/**
22 * Created by Ivo Meißner on 28.07.17.
3- *
4- * @flow
53 */
6- import { ValidationContext } from 'graphql' ;
7- import QueryComplexity from './QueryComplexity.js' ;
8- import { QueryComplexityOptions } from './QueryComplexity.js' ;
94
105export * from './estimators/index.js' ;
116export * from './QueryComplexity.js' ;
7+ import { createComplexityRule as createComplexityRuleFn } from './createComplexityRule.js' ;
128
13- export function createComplexityRule (
14- options : QueryComplexityOptions
15- ) : ( context : ValidationContext ) => QueryComplexity {
16- return ( context : ValidationContext ) : QueryComplexity => {
17- return new QueryComplexity ( context , options ) ;
18- } ;
19- }
20-
9+ export const createComplexityRule = createComplexityRuleFn ;
2110export default createComplexityRule ;
You can’t perform that action at this time.
0 commit comments