admin.ts 526 B

12345678910111213141516171819202122232425262728293031
  1. import { gql } from 'apollo-server-express'
  2. import { Admin } from '../../src/models/Admin'
  3. export const GET_KILL_SWITCH = gql`
  4. query GetKillSwitch {
  5. admin {
  6. isKilled
  7. }
  8. }
  9. `
  10. export type GetKillSwitch = {
  11. admin: {
  12. isKilled: boolean
  13. }
  14. }
  15. export const SET_KILL_SWITCH = gql`
  16. mutation SetKillSwitch($isKilled: Boolean!) {
  17. setKillSwitch(isKilled: $isKilled) {
  18. isKilled
  19. }
  20. }
  21. `
  22. export type SetKillSwitch = {
  23. setKillSwitch: Admin
  24. }
  25. export type SetKillSwitchArgs = {
  26. isKilled: boolean
  27. }