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 1
1
/**
2
2
* Created by Ivo Meißner on 28.07.17.
3
- *
4
- * @flow
5
3
*/
6
- import { ValidationContext } from 'graphql' ;
7
- import QueryComplexity from './QueryComplexity.js' ;
8
- import { QueryComplexityOptions } from './QueryComplexity.js' ;
9
4
10
5
export * from './estimators/index.js' ;
11
6
export * from './QueryComplexity.js' ;
7
+ import { createComplexityRule as createComplexityRuleFn } from './createComplexityRule.js' ;
12
8
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 ;
21
10
export default createComplexityRule ;
You can’t perform that action at this time.
0 commit comments