github.com/animeshon/gqlgen@v0.13.1-0.20210304133704-3a770431bb6d/example/config/resolver.go (about) 1 //go:generate go run ../../testdata/gqlgen.go 2 3 package config 4 5 func New() Config { 6 c := Config{ 7 Resolvers: &Resolver{ 8 todos: []*Todo{ 9 {DatabaseID: 1, Description: "A todo not to forget", Done: false}, 10 {DatabaseID: 2, Description: "This is the most important", Done: false}, 11 {DatabaseID: 3, Description: "Please do this or else", Done: false}, 12 }, 13 nextID: 3, 14 }, 15 } 16 return c 17 } 18 19 type Resolver struct { 20 todos []*Todo 21 nextID int 22 }