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
26 lines
725 B
package resolvers
|
|
|
|
import (
|
|
"git.aiterp.net/rpdata/api/graph2/graphcore"
|
|
"git.aiterp.net/rpdata/api/services"
|
|
)
|
|
|
|
type queryResolver struct{ s *services.Bundle }
|
|
type mutationResolver struct{ s *services.Bundle }
|
|
|
|
type subscriptionResolver struct{ s *services.Bundle }
|
|
|
|
// QueryResolver has all the queries
|
|
func QueryResolver(s *services.Bundle) graphcore.QueryResolver {
|
|
return &queryResolver{s: s}
|
|
}
|
|
|
|
// MutationResolver brings the radioactive goop
|
|
func MutationResolver(s *services.Bundle) graphcore.MutationResolver {
|
|
return &mutationResolver{s: s}
|
|
}
|
|
|
|
// SubscriptionResolver has the real-time magic.
|
|
func SubscriptionResolver(s *services.Bundle) graphcore.SubscriptionResolver {
|
|
return &subscriptionResolver{s: s}
|
|
}
|