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.

17 lines
754 B

  1. // Package queries contains resolvers for individual GrahpQL queries. They were previously mixed in with one another, but that caused
  2. // difficulty seeking out specific queries.
  3. package queries
  4. import "errors"
  5. // QueryResolver is a resolver for all queries. The stuttery name is due to being embedded in the root resolver.
  6. type QueryResolver struct{}
  7. // ErrCannotResolve is returned when a resolver constructor is at its wit's end
  8. var ErrCannotResolve = errors.New("Cannot resolve due to invalid arguments")
  9. // ErrUnauthorized is when a guest acts like they own the place
  10. var ErrUnauthorized = errors.New("Unauthorized")
  11. // ErrPermissionDenied is returned when users act above their station
  12. var ErrPermissionDenied = errors.New("Permission denied")