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
725 B

  1. package resolvers
  2. import (
  3. "git.aiterp.net/rpdata/api/graph2/graphcore"
  4. "git.aiterp.net/rpdata/api/services"
  5. )
  6. type queryResolver struct{ s *services.Bundle }
  7. type mutationResolver struct{ s *services.Bundle }
  8. type subscriptionResolver struct{ s *services.Bundle }
  9. // QueryResolver has all the queries
  10. func QueryResolver(s *services.Bundle) graphcore.QueryResolver {
  11. return &queryResolver{s: s}
  12. }
  13. // MutationResolver brings the radioactive goop
  14. func MutationResolver(s *services.Bundle) graphcore.MutationResolver {
  15. return &mutationResolver{s: s}
  16. }
  17. // SubscriptionResolver has the real-time magic.
  18. func SubscriptionResolver(s *services.Bundle) graphcore.SubscriptionResolver {
  19. return &subscriptionResolver{s: s}
  20. }