You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
807 B
39 lines
807 B
package graph2
|
|
|
|
import (
|
|
"git.aiterp.net/rpdata/api/graph2/queries"
|
|
"git.aiterp.net/rpdata/api/graph2/types"
|
|
graphql "github.com/99designs/gqlgen/graphql"
|
|
)
|
|
|
|
//go:generate ./combine.sh
|
|
//go:generate gorunpkg github.com/99designs/gqlgen -v
|
|
|
|
// New creates a new GraphQL schema.
|
|
func New() graphql.ExecutableSchema {
|
|
return NewExecutableSchema(Config{
|
|
Resolvers: &rootResolver{},
|
|
})
|
|
}
|
|
|
|
type rootResolver struct{}
|
|
|
|
func (r *rootResolver) Query() QueryResolver {
|
|
return &queries.Resolver
|
|
}
|
|
|
|
func (r *rootResolver) Log() LogResolver {
|
|
return &types.LogResolver
|
|
}
|
|
|
|
func (r *rootResolver) Chapter() ChapterResolver {
|
|
return &types.ChapterResolver
|
|
}
|
|
|
|
func (r *rootResolver) Story() StoryResolver {
|
|
return &types.StoryResolver
|
|
}
|
|
|
|
func (r *rootResolver) File() FileResolver {
|
|
return &types.FileResolver
|
|
}
|