import gql from 'graphql-tag'

export * from './robot-arm'
export * from './robot-arm-list'
export * from './pose-input'
export * from './joints-input'
export * from './robot-arm-status'

export const RobotArmResolvers = gql`
  extend type Mutation {
    robotArmReset(name: String!): Boolean
    robotArmGoHome(name: String!): Boolean
    robotArmGoZero(name: String!): Boolean
    robotArmTaskMoveTo(name: String!, pose: PoseInput!): Pose
    robotArmTaskMoveBy(name: String!, pose: PoseInput!): Pose
    robotArmTaskMoveByNoWait(name: String!, pose: PoseInput!): Pose
    robotArmStartTeachingMode(name: String!): Boolean
    robotArmFinishTeachingMode(name: String!): Boolean
    robotArmJointMoveTo(name: String!, joints: JointsInput!): Joints
    robotArmSetHome(name: String!, joints: JointsInput!): Joints
  }

  extend type Query {
    robotArms(filters: [Filter], pagination: Pagination, sortings: [Sorting]): RobotArmList
    robotArm(name: String!): RobotArm
    robotArmPose(name: String!): Pose
    robotArmGetPose(name: String!): Pose
    robotArmGetStatus(name: String!): RobotArmStatus
    robotArmJoints(name: String!): Joints
    robotArmGetJoints(name: String!): Joints
  }
`
