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.

24 lines
479 B

  1. package types
  2. import (
  3. "context"
  4. "git.aiterp.net/rpdata/api/graph2/input"
  5. "git.aiterp.net/rpdata/api/models"
  6. )
  7. type changeResolver struct{}
  8. func (r *changeResolver) Objects(ctx context.Context, obj *models.Change) ([]input.ChangeObject, error) {
  9. objects := obj.Objects()
  10. results := make([]input.ChangeObject, len(objects))
  11. for i := range objects {
  12. results[i] = objects[i]
  13. }
  14. return results, nil
  15. }
  16. // ChangeResolver is a resolver
  17. var ChangeResolver changeResolver