import { gql } from 'apollo-server' ; const typeDefs = gql `
  "Can represent any JSON-serializable value, including scalars, arrays, and objects"
  scalar JSON
  "Represents specifically JSON objects, which covers many practical use cases for JSON scalars."
  scalar JSONObject

  "Contains info only about the root workspace"
  type TargetWorkspaceRootInfo {
    name: String
    pathToRootDir: String
    packageJsonConfigContent: JSONObject
  }

  "Contains full info about target workspace and its packages"
  type TargetWorkspaceInfo {
    rootInfo: TargetWorkspaceRootInfo
    packagesInfo: JSONObject
  }

  "Returns health-check info"
  type HealthCheckInfo {
    "Is the service running"
    isRunning: Boolean
  }

  type Query {
    "Will return the workspace info (path, name, packages names and packages info etc.)"
    getWorkspaceInfo: TargetWorkspaceInfo
    "Will return the health-check info"
    getHealthCheckInfo: HealthCheckInfo
  }
` ; export default typeDefs ;