@@ -38,28 +38,25 @@ export function prepareCommonOpts<TContext>(
3838 schemaComposer ,
3939 getOrCreateOTC : ( typeName , cfgOrThunk ) => {
4040 return schemaComposer . getOrSet ( typeName , ( ) => {
41- const tc = schemaComposer . createObjectTC ( typeName ) ;
42- const cfg = isFunction ( cfgOrThunk ) ? ( cfgOrThunk : any ) ( ) : cfgOrThunk ;
43- tc . setFields ( cfg . fields ) ;
44- tc . setDescription ( cfg . description ) ;
41+ const tc = schemaComposer . createObjectTC (
42+ isFunction ( cfgOrThunk ) ? ( cfgOrThunk : any ) ( ) : cfgOrThunk
43+ ) ;
4544 return tc ;
4645 } ) ;
4746 } ,
4847 getOrCreateITC : ( typeName , cfgOrThunk ) = > {
4948 return schemaComposer . getOrSet ( typeName , ( ) => {
50- const tc = schemaComposer . createInputTC ( typeName ) ;
51- const cfg = isFunction ( cfgOrThunk ) ? ( cfgOrThunk : any ) ( ) : cfgOrThunk ;
52- tc . setFields ( cfg . fields ) ;
53- tc . setDescription ( cfg . description ) ;
49+ const tc = schemaComposer . createInputTC (
50+ isFunction ( cfgOrThunk ) ? ( cfgOrThunk : any ) ( ) : cfgOrThunk
51+ ) ;
5452 return tc ;
5553 } ) ;
5654 } ,
5755 getOrCreateETC : ( typeName , cfgOrThunk ) = > {
5856 return schemaComposer . getOrSet ( typeName , ( ) => {
59- const tc = schemaComposer . createEnumTC ( typeName ) ;
60- const cfg = isFunction ( cfgOrThunk ) ? ( cfgOrThunk : any ) ( ) : cfgOrThunk ;
61- tc . setFields ( cfg . values ) ;
62- tc . setDescription ( cfg . description ) ;
57+ const tc = schemaComposer . createEnumTC (
58+ isFunction ( cfgOrThunk ) ? ( cfgOrThunk : any ) ( ) : cfgOrThunk
59+ ) ;
6360 return tc ;
6461 } ) ;
6562 } ,
0 commit comments