-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(): minor fixes to the resource (gql) schematic
- Loading branch information
1 parent
2b87e50
commit 9ea32ef
Showing
3 changed files
with
19 additions
and
7 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
7 changes: 5 additions & 2 deletions
7
src/lib/resource/files/ts/dto/create-__name@singular__.input.ts
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
<% if (type === 'graphql-code-first') { %>import { InputType } from '@nestjs/graphql'; | ||
<% if (type === 'graphql-code-first') { %>import { InputType, Int, Field } from '@nestjs/graphql'; | ||
|
||
@InputType() | ||
export class Create<%= singular(classify(name)) %>Input {}<% } else { %>export class Create<%= singular(classify(name)) %>Input {}<% } %> | ||
export class Create<%= singular(classify(name)) %>Input { | ||
@Field(() => Int, { description: 'Example field (placeholder)' }) | ||
exampleField: number; | ||
}<% } else { %>export class Create<%= singular(classify(name)) %>Input {}<% } %> |
7 changes: 5 additions & 2 deletions
7
src/lib/resource/files/ts/entities/__name@singular__.entity.ts
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
<% if (type === 'graphql-code-first') { %>import { ObjectType } from '@nestjs/graphql'; | ||
<% if (type === 'graphql-code-first') { %>import { ObjectType, Field, Int } from '@nestjs/graphql'; | ||
|
||
@ObjectType() | ||
export class <%= singular(classify(name)) %> {}<% } else { %>export class <%= singular(classify(name)) %> {}<% } %> | ||
export class <%= singular(classify(name)) %> { | ||
@Field(() => Int, { description: 'Example field (placeholder)' }) | ||
exampleField: number; | ||
}<% } else { %>export class <%= singular(classify(name)) %> {}<% } %> |