enum AnalysisStatus {
  QUEUED
  IN_PROGRESS
  FAILED
  COMPLETED
  UNKNOWN
}

"""Filter for GraphQL queries"""
input AnalysisStatusGraphQLFilter {
  eq: AnalysisStatus = null
  in_: [AnalysisStatus!] = null
  nin: [AnalysisStatus!] = null
}

"""Filter for GraphQL queries"""
input BoolGraphQLFilter {
  eq: Boolean = null
  in_: [Boolean!] = null
  nin: [Boolean!] = null
}

type GraphQLAnalysis {
  id: Int!
  type: String!
  status: AnalysisStatus!
  output: String
  timestampCompleted: String
  active: Boolean!
  meta: JSON!
  author: String!
  sequencingGroups: [GraphQLSequencingGroup!]!
  project: GraphQLProject!
}

type GraphQLAssay {
  id: Int!
  type: String!
  meta: JSON!
  externalIds: JSON!
  sample: GraphQLSample!
}

type GraphQLEnum {
  analysisType: [String!]!
  assayType: [String!]!
  sampleType: [String!]!
  sequencingPlatform: [String!]!
  sequencingTechnology: [String!]!
  sequencingType: [String!]!
}

type GraphQLFamily {
  id: Int!
  externalId: String!
  description: String
  codedPhenotype: String
  project: GraphQLProject!
  participants: [GraphQLParticipant!]!
}

type GraphQLParticipant {
  id: Int!
  externalId: String!
  meta: JSON!
  reportedSex: Int
  reportedGender: String
  karyotype: String
  samples(type: StrGraphQLFilter = null, meta: JSON = null, active: BoolGraphQLFilter = null): [GraphQLSample!]!
  phenotypes: JSON!
  families: [GraphQLFamily!]!
  project: GraphQLProject!
}

type GraphQLProject {
  id: Int!
  name: String!
  dataset: String!
  meta: JSON!
  pedigree(internalFamilyIds: [Int!] = null, replaceWithParticipantExternalIds: Boolean! = true, replaceWithFamilyExternalIds: Boolean! = true, includeParticipantsNotInFamilies: Boolean! = false, emptyParticipantValue: String = null): [JSON!]!
  families: [GraphQLFamily!]!
  participants: [GraphQLParticipant!]!
  samples(type: StrGraphQLFilter = null, externalId: StrGraphQLFilter = null, id: StrGraphQLFilter = null, meta: JSON = null): [GraphQLSample!]!
  sequencingGroups(id: StrGraphQLFilter = null, externalId: StrGraphQLFilter = null, type: StrGraphQLFilter = null, technology: StrGraphQLFilter = null, platform: StrGraphQLFilter = null, activeOnly: BoolGraphQLFilter = null): [GraphQLSequencingGroup!]!
  analyses(type: StrGraphQLFilter = null, status: AnalysisStatusGraphQLFilter = null, active: BoolGraphQLFilter = null, meta: JSON = null): [GraphQLAnalysis!]!
}

type GraphQLSample {
  id: String!
  externalId: String!
  active: Boolean!
  meta: JSON!
  type: String!
  author: String
  participant: GraphQLParticipant
  assays(type: StrGraphQLFilter = null): [GraphQLAssay!]!
  project: GraphQLProject!
  sequencingGroups(id: StrGraphQLFilter = null, type: StrGraphQLFilter = null, technology: StrGraphQLFilter = null, platform: StrGraphQLFilter = null, meta: JSON = null, activeOnly: BoolGraphQLFilter = null): [GraphQLSequencingGroup!]!
}

type GraphQLSequencingGroup {
  id: String!
  type: String!
  technology: String!
  platform: String!
  meta: JSON!
  externalIds: JSON
  sample: GraphQLSample!
  analyses(status: AnalysisStatusGraphQLFilter = null, type: StrGraphQLFilter = null, meta: JSON = null, active: BoolGraphQLFilter = null, project: StrGraphQLFilter = null): [GraphQLAnalysis!]!
  assays: [GraphQLAssay!]!
}

"""Filter for GraphQL queries"""
input IntGraphQLFilter {
  eq: Int = null
  in_: [Int!] = null
  nin: [Int!] = null
}

"""
The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
"""
scalar JSON @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf")

type Query {
  enum: GraphQLEnum!
  project(name: String!): GraphQLProject!
  sample(id: StrGraphQLFilter = null, project: StrGraphQLFilter = null, type: StrGraphQLFilter = null, meta: JSON = null, externalId: StrGraphQLFilter = null, participantId: IntGraphQLFilter = null, active: BoolGraphQLFilter = null): [GraphQLSample!]!
  sequencingGroups(id: StrGraphQLFilter = null, project: StrGraphQLFilter = null, sampleId: StrGraphQLFilter = null, type: StrGraphQLFilter = null, technology: StrGraphQLFilter = null, platform: StrGraphQLFilter = null, activeOnly: BoolGraphQLFilter = null): [GraphQLSequencingGroup!]!
  assay(id: Int!): GraphQLAssay!
  participant(id: Int!): GraphQLParticipant!
  family(familyId: Int!): GraphQLFamily!
  myProjects: [GraphQLProject!]!
}

"""Filter for GraphQL queries"""
input StrGraphQLFilter {
  eq: String = null
  in_: [String!] = null
  nin: [String!] = null
}
