adding in resolvers and todos store

This commit is contained in:
talksik
2023-05-23 16:37:22 -07:00
parent a945d2ee54
commit eb1492f509
2 changed files with 38 additions and 13 deletions
+28 -1
View File
@@ -1,7 +1,34 @@
package graph
import "github.com/talksik/graphql-golang/graph/model"
// This file will not be regenerated automatically.
//
// It serves as dependency injection for your app, add any dependencies you require here.
type Resolver struct{}
var todos = []*model.Todo{
{
ID: "1",
Text: "laundry",
Done: false,
},
{
ID: "2",
Text: "woah",
Done: false,
},
{
ID: "3",
Text: "Hello",
Done: false,
User: &model.User{
ID: "1",
Name: "Talksik",
},
},
}
type Resolver struct{
Todos []*model.Todo
}