GraphQL API and utilities for the rpdata project
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.
 
 

26 lines
551 B

package resolvers
import (
"context"
"git.aiterp.net/rpdata/api/models"
)
/// Queries
func (r *queryResolver) Changes(ctx context.Context, filter *models.ChangeFilter) ([]*models.Change, error) {
if filter == nil {
filter = &models.ChangeFilter{}
}
return r.s.Changes.List(ctx, *filter)
}
/// Subscriptions
func (r *subscriptionResolver) Changes(ctx context.Context, filter *models.ChangeFilter) (<-chan *models.Change, error) {
if filter == nil {
filter = &models.ChangeFilter{}
}
return r.s.Changes.Subscribe(ctx, *filter), nil
}