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) Comment() CommentResolver { return &types.CommentResolver } 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 }