Many Type is not defined.
See original GitHub issueDescribe the bug When types are generated the Maybe type is not included.
To Reproduce Steps to reproduce the behavior:
- Use the following config:
overwrite: true
schema: './src/schema.ts'
generates:
src/types/generated.ts:
- add: '// THIS IS A GENERATED FILE, DO NOT EDIT IT!'
- 'typescript-server'
- 'typescript-resolvers'
require:
- ts-node/register
- Include typedefs & resolver and create executableSchema.
- Run codegen.
Expected behavior All types are correctly genereted except for the Maybe type, that one is missing.
Schema/Documents Ofcourse create an executableSchema from the following.
export const typeDefs: DocumentNode = gql`
type Field {
id: ID!
testId: ID!
}
type Query {
FieldsByTest: [Field!]
}
`;
export const resolver = {
Query: {
FieldsByTest: (_) => {
return [];
},
},
};
Environment:
- OS: Mac OS 10.12.6
- Codegen: ^0.15.2
- Node: 10.14.1
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
"Type is not defined" error on project build - vb.net
You need to make sure that the consuming project is targeting a .NET Framework version which is equal to or higher than the...
Read more >Type '<typename>' is not defined - Visual Basic - Microsoft Learn
Ensure that the type definition and its reference both use the same spelling. · Ensure that the type definition is accessible to the...
Read more >Type is not defined, even though it's defined
VS is indicating a class is not defined, even though the class is defined, the current import statement is present, and the reference...
Read more >How to Fix Compile Error: User-defined Type Not Defined ...
User-defined type | not defined. First, let's try to understand we have encountered the error because something is. “not defined”.
Read more >VB.Net Troubleshooting - Type <type-name> is not defined.
A common cause is a simple misspelling where the class name is used. ... Here the class name should have been ' OdbcConnection...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In the config file above
'typescript-server'
.I’m sure a PR would be appreciated @Pruxis. Shouldn’t be difficult.