File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
packages/graphql/lib/utils Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change
1
+ import { isString , isObject } from '@nestjs/common/utils/shared.utils' ;
2
+ import { AutoSchemaFileValue , UseFed2Value } from '../interfaces' ;
3
+
4
+ export function getPathForAutoSchemaFile (
5
+ autoSchemaFile : AutoSchemaFileValue ,
6
+ ) : string | null {
7
+ if ( isString ( autoSchemaFile ) ) {
8
+ return autoSchemaFile ;
9
+ }
10
+ if ( isObject ( autoSchemaFile ) && autoSchemaFile . path ) {
11
+ return autoSchemaFile . path ;
12
+ }
13
+ return null ;
14
+ }
15
+
16
+ export function getFederation2Info (
17
+ autoSchemaFile : AutoSchemaFileValue ,
18
+ ) : UseFed2Value {
19
+ if ( isObject ( autoSchemaFile ) ) {
20
+ return autoSchemaFile . useFed2 ;
21
+ }
22
+ return false ;
23
+ }
Original file line number Diff line number Diff line change
1
+ export * from './auto-schema-file.util' ;
1
2
export * from './extend.util' ;
2
3
export * from './extract-metadata.util' ;
3
4
export * from './generate-token.util' ;
4
5
export * from './get-number-of-arguments.util' ;
5
6
export * from './normalize-route-path.util' ;
6
- export * from './remove-temp.util' ;
7
7
export * from './object.util' ;
8
+ export * from './remove-temp.util' ;
You can’t perform that action at this time.
0 commit comments