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.
55 lines
1.1 KiB
55 lines
1.1 KiB
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) Mutation() MutationResolver {
|
|
return queries.MutationResolver
|
|
}
|
|
|
|
func (r *rootResolver) Subscription() SubscriptionResolver {
|
|
return queries.SubscriptionResolver
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
func (r *rootResolver) Change() ChangeResolver {
|
|
return &types.ChangeResolver
|
|
}
|
|
|
|
func (r *rootResolver) Token() TokenResolver {
|
|
return &types.TokenResolver
|
|
}
|