package queries import ( "context" "git.aiterp.net/rpdata/api/graphql/resolver/types" "git.aiterp.net/rpdata/api/model/log" ) // PostArgs is args for the post query type PostArgs struct { ID string } // Post resolves the post query func (r *QueryResolver) Post(ctx context.Context, args *PostArgs) (*types.PostResolver, error) { post, err := log.FindPostID(args.ID) if err != nil { return nil, err } return &types.PostResolver{P: post}, nil }