@@ -50,7 +50,7 @@ function loadSiblings(baseDir: string, loadPaths: string[]): Source[] {
50
50
return loadDocumentsSync ( loadPaths , {
51
51
cwd : baseDir ,
52
52
loaders : operationsLoaders ,
53
- } ) . map ( r => ( { ... r , location : join ( baseDir , r . location ) } ) ) ;
53
+ } ) ;
54
54
}
55
55
56
56
const operationsCache : Map < string , Source [ ] > = new Map ( ) ;
@@ -120,8 +120,8 @@ export function getSiblingOperations(options: ParserOptions, gqlConfig: GraphQLC
120
120
// Since the siblings array is cached, we can use it as cache key.
121
121
// We should get the same array reference each time we get
122
122
// to this point for the same graphql project
123
- if ( siblingOperationsCache . has ( siblings ) ) {
124
- return siblingOperationsCache . get ( siblings )
123
+ if ( siblingOperationsCache . has ( siblings ) ) {
124
+ return siblingOperationsCache . get ( siblings ) ;
125
125
}
126
126
127
127
let fragmentsCache : FragmentSource [ ] | null = null ;
@@ -216,6 +216,6 @@ export function getSiblingOperations(options: ParserOptions, gqlConfig: GraphQLC
216
216
getOperationByType : type => getOperations ( ) . filter ( o => o . document . operation === type ) ,
217
217
getFragmentsInUse : ( selectable , recursive = true ) => Array . from ( collectFragments ( selectable , recursive ) . values ( ) ) ,
218
218
} ;
219
- siblingOperationsCache . set ( siblings , siblingOperations )
220
- return siblingOperations
219
+ siblingOperationsCache . set ( siblings , siblingOperations ) ;
220
+ return siblingOperations ;
221
221
}
0 commit comments