Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow referencing backing types via rootTypings in codegen
- Loading branch information
Showing
6 changed files
with
139 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`rootTypings can import enum via rootTyping 1`] = ` | ||
"/** | ||
* This file was automatically generated by GraphQL Nexus | ||
* Do not make changes to this file directly | ||
*/ | ||
import { TestEnum } from \\"./tests/backingTypes.spec\\" | ||
declare global { | ||
interface NexusGen extends NexusGenTypes {} | ||
} | ||
export interface NexusGenInputs { | ||
} | ||
export interface NexusGenEnums { | ||
TestEnumType: TestEnum | ||
} | ||
export interface NexusGenRootTypes { | ||
Query: {}; | ||
String: string; | ||
Int: number; | ||
Float: number; | ||
Boolean: boolean; | ||
ID: string; | ||
} | ||
export interface NexusGenAllTypes extends NexusGenRootTypes { | ||
TestEnumType: NexusGenEnums['TestEnumType']; | ||
} | ||
export interface NexusGenFieldTypes { | ||
Query: { // field return type | ||
ok: boolean; // Boolean! | ||
} | ||
} | ||
export interface NexusGenArgTypes { | ||
} | ||
export interface NexusGenAbstractResolveReturnTypes { | ||
} | ||
export interface NexusGenInheritedFields {} | ||
export type NexusGenObjectNames = \\"Query\\"; | ||
export type NexusGenInputNames = never; | ||
export type NexusGenEnumNames = \\"TestEnumType\\"; | ||
export type NexusGenInterfaceNames = never; | ||
export type NexusGenScalarNames = \\"Boolean\\" | \\"Float\\" | \\"ID\\" | \\"Int\\" | \\"String\\"; | ||
export type NexusGenUnionNames = never; | ||
export interface NexusGenTypes { | ||
context: any; | ||
inputTypes: NexusGenInputs; | ||
rootTypes: NexusGenRootTypes; | ||
argTypes: NexusGenArgTypes; | ||
fieldTypes: NexusGenFieldTypes; | ||
allTypes: NexusGenAllTypes; | ||
inheritedFields: NexusGenInheritedFields; | ||
objectNames: NexusGenObjectNames; | ||
inputNames: NexusGenInputNames; | ||
enumNames: NexusGenEnumNames; | ||
interfaceNames: NexusGenInterfaceNames; | ||
scalarNames: NexusGenScalarNames; | ||
unionNames: NexusGenUnionNames; | ||
allInputTypes: NexusGenTypes['inputNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['scalarNames']; | ||
allOutputTypes: NexusGenTypes['objectNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['unionNames'] | NexusGenTypes['interfaceNames'] | NexusGenTypes['scalarNames']; | ||
allNamedTypes: NexusGenTypes['allInputTypes'] | NexusGenTypes['allOutputTypes'] | ||
abstractTypes: NexusGenTypes['interfaceNames'] | NexusGenTypes['unionNames']; | ||
abstractResolveReturn: NexusGenAbstractResolveReturnTypes; | ||
}" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters