39 lines
1.2 KiB
Go
39 lines
1.2 KiB
Go
package graph
|
|
|
|
// This file will be automatically regenerated based on the schema, any resolver implementations
|
|
// will be copied through when generating and any unknown code will be moved to the end.
|
|
// Code generated by github.com/99designs/gqlgen version v0.17.66
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"git.squidspirit.com/squid/blog.git/backend/internal/adapter/controller"
|
|
"git.squidspirit.com/squid/blog.git/backend/internal/adapter/controller/graphdto"
|
|
)
|
|
|
|
// Posts is the resolver for the posts field.
|
|
func (r *queryResolver) Posts(ctx context.Context) ([]*graphdto.Post, error) {
|
|
c := controller.NewQueryPostsController(r.GetAllPostsUseCase)
|
|
dtos, err := c.Handle()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dtos, nil
|
|
}
|
|
|
|
// Post is the resolver for the post field.
|
|
func (r *queryResolver) Post(ctx context.Context, id uint32) (*graphdto.Post, error) {
|
|
panic(fmt.Errorf("not implemented: Post - post"))
|
|
}
|
|
|
|
// Label is the resolver for the label field.
|
|
func (r *queryResolver) Label(ctx context.Context, id uint32) (*graphdto.Label, error) {
|
|
panic(fmt.Errorf("not implemented: Label - label"))
|
|
}
|
|
|
|
// Query returns QueryResolver implementation.
|
|
func (r *Resolver) Query() QueryResolver { return &queryResolver{r} }
|
|
|
|
type queryResolver struct{ *Resolver }
|