This file contains hidden or 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
| type User { | |
| id: ID! | |
| name: String! | |
| age: Int! | |
| todos: [Todo!]! | |
| createdAt: String! | |
| updatedAt: String! | |
| } | |
| extend type Query { |
This file contains hidden or 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
| package graph | |
| // This file will be automatically regenerated based on the schema, any resolver implementations | |
| // will be copied through when generating and any unknown code will be moved to the end. | |
| import ( | |
| "context" | |
| "golang-clean-architecture-ent-gqlgen/ent" | |
| "golang-clean-architecture-ent-gqlgen/ent/todo" | |
| "golang-clean-architecture-ent-gqlgen/graph/generated" |
This file contains hidden or 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
| models: | |
| ID: | |
| model: | |
| - github.com/99designs/gqlgen/graphql.Int | |
| - github.com/99designs/gqlgen/graphql.Int64 | |
| - github.com/99designs/gqlgen/graphql.Int32 | |
| Int: | |
| model: | |
| - github.com/99designs/gqlgen/graphql.Int | |
| - github.com/99designs/gqlgen/graphql.Int64 |
This file contains hidden or 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
| enum TodoStatus { | |
| IN_PROGRESS | |
| COMPLETED | |
| } | |
| type Todo { | |
| id: ID! | |
| name: String! | |
| status: TodoStatus! | |
| priority: Int! |
This file contains hidden or 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
| package graph | |
| // This file will be automatically regenerated based on the schema, any resolver implementations | |
| // will be copied through when generating and any unknown code will be moved to the end. | |
| import ( | |
| "context" | |
| "golang-clean-architecture-ent-gqlgen/ent" | |
| "golang-clean-architecture-ent-gqlgen/ent/user" | |
| "golang-clean-architecture-ent-gqlgen/graph/generated" |
This file contains hidden or 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
| # Where should any generated models go? | |
| #model: | |
| # filename: graph/model/models_gen.go | |
| # package: model |
This file contains hidden or 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
| autobind: | |
| - "golang-clean-architecture-ent-gqlgen/ent" |
This file contains hidden or 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
| type User { | |
| id: ID! | |
| name: String! | |
| age: Int! | |
| createdAt: String! | |
| updatedAt: String! | |
| } | |
| extend type Query { | |
| user(id: ID): User |
This file contains hidden or 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
| type Query |
This file contains hidden or 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
| package main | |
| import ( | |
| "golang-clean-architecture-ent-gqlgen/config" | |
| "golang-clean-architecture-ent-gqlgen/ent" | |
| "golang-clean-architecture-ent-gqlgen/graph" | |
| "log" | |
| "net/http" | |
| "entgo.io/ent/dialect" |