Skip to content

Instantly share code, notes, and snippets.

@harlyon
Last active May 29, 2020 11:21
Show Gist options
  • Select an option

  • Save harlyon/7ab8154bb915b51408974aab0c27c6db to your computer and use it in GitHub Desktop.

Select an option

Save harlyon/7ab8154bb915b51408974aab0c27c6db to your computer and use it in GitHub Desktop.
# import GradeType from 'src/generated/prisma.graphql'
# import Activity from 'src/generated/prisma.graphql'
# import Beneficiary, BeneficiaryType from 'src/generated/prisma.graphql'
# import District from 'src/generated/prisma.graphql'
# import Input from 'src/generated/prisma.graphql'
# import Institutiion from 'src/generated/prisma.graphql'
# import Intervention from 'src/generated/prisma.graphql'
# import Province from 'src/generated/prisma.graphql'
# import ServiceProvider from 'src/generated/prisma.graphql'
# import User from 'src/generated/prisma.graphql'
# import UserConnection from 'src/generated/prisma.graphql'
# import Mutation.createFile, Mutation.createUser, Mutation.createOrganisation, Mutation.createOutcome from 'src/generated/prisma.graphql'
# import Mutation.updateFile, Mutation.updateUser, Mutation.updateOrganisation from 'src/generated/prisma.graphql'
# import Mutation.deleteFile, Mutation.deleteOrganisation, Mutation.deleteActivity from 'src/generated/prisma.graphql'
# import Query from 'src/generated/prisma.graphql'
# import Mutation from 'src/resolvers/mutations/auth/schema.graphql'
# import Mutation from 'src/resolvers/mutations/activity/schema.graphql'
# import Mutation from 'src/resolvers/mutations/input/schema.graphql'
# import Mutation from 'src/resolvers/mutations/intervention/schema.graphql'
# import Mutation from 'src/resolvers/mutations/stakeholder/schema.graphql'
# import Mutation from 'src/resolvers/mutations/institution/schema.graphql'
# import Mutation from 'src/resolvers/mutations/programme/schema.graphql'
# import Mutation from 'src/resolvers/mutations/report/schema.graphql'
# import Mutation from 'src/resolvers/mutations/schoolData/schema.graphql'
# import Mutation from 'src/resolvers/mutations/serviceProvider/schema.graphql'
# import Mutation from 'src/resolvers/mutations/user/schema.graphql'
# import Mutation from 'src/resolvers/mutations/file/schema.graphql'
# import Mutation from 'src/resolvers/mutations/session/schema.graphql'
# import Mutation from 'src/resolvers/mutations/funder/schema.graphql'
# import Mutation from 'src/resolvers/mutations/indicator/schema.graphql'
# import Query from 'src/resolvers/queries/indicator/schema.graphql'
# import Query from 'src/resolvers/queries/province/schema.graphql'
# import Query from 'src/resolvers/queries/outcomes/schema.graphql'
# import Query from 'src/resolvers/queries/district/schema.graphql'
# import Query from 'src/resolvers/queries/session/schema.graphql'
# import Query from 'src/resolvers/queries/activity/schema.graphql'
# import Query from 'src/resolvers/queries/activityRelated/schema.graphql'
# import Query from 'src/resolvers/queries/input/schema.graphql'
# import Query from 'src/resolvers/queries/institution/schema.graphql'
# import Query from 'src/resolvers/queries/institutionRelated/schema.graphql'
# import Query from 'src/resolvers/queries/intervention/schema.graphql'
# import Query from 'src/resolvers/queries/interventionType/schema.graphql'
# import Query from 'src/resolvers/queries/profile/schema.graphql'
# import Query from 'src/resolvers/queries/beneficiary/schema.graphql'
# import Query from 'src/resolvers/queries/service-provider/schema.graphql'
# import Query from 'src/resolvers/queries/programme/schema.graphql'
# import Query from 'src/resolvers/queries/subject/schema.graphql'
# import Query from 'src/resolvers/queries/schoolData/schema.graphql'
# import Query from 'src/resolvers/queries/stakeholder/schema.graphql'
# import Query from 'src/resolvers/queries/themes/schema.graphql'
# import Query from 'src/resolvers/queries/filteredSchoolData/schema.graphql'
# import Query from 'src/resolvers/queries/report/schema.graphql'
# import Query from 'src/resolvers/queries/file/schema.graphql'
# import Query from 'src/resolvers/queries/user/schema.graphql'
# import Query from 'src/resolvers/queries/funder/schema.graphql'
# import * from 'src/resolvers/directives/schema.graphql'
scalar Upload
type Mutation @isFunder {
# upsert programme
upsertProgramme(input: UpsertProgrammeInput!): Programme
upsertFunderReport(input: UpsertReportInput!): Report @isAuthenticated
}
type Query @isFunder {
# dashboard totals
totalFunderSessions(input: FilterArgs): Int
totalFunderStakeholdersInSessions(input: FilterArgs): Int
totalFunderServiceProviders(input: FilterArgs): Int
totalFunderSchools(input: FilterArgs): Int
totalFunderBeneficiaries(input: FilterArgs): Int
totalFunderProvincesInSessions(input: FilterArgs): Int
totalFunderInterventionTypesInSessions(input: FilterArgs): Int
totalFunderLearnersInSessions(input: FilterArgs): Int
totalFunderDistrictsInSessions(input: FilterArgs): Int
totalFunderServiceProvidersInSessions(input: FilterArgs): Int
totalFunderSchoolsInSessions(input: FilterArgs): Int
funderPromotionRate(input: FilterArgs): [PromotionRate]
# programmes
dashboardFunderProgrammes(input: FilterArgs): [Programme]
exportFunderProgrammes(input: ExportArgs): [Programme]
funderProgrammes(input: FilterArgs): [Programme]
# schools in exports
allFunderEnrolmentSchools(input: ExportArgs): [Institution]
allFunderAttendanceSchools(input: ExportArgs): [Institution]
allFunderPromotionSchools(input: ExportArgs): [Institution]
allFunderEducatorSchools(input: ExportArgs): [Institution]
allFunderSubjectReportSchools(input: ExportArgs): [Institution]
allFunderNSCProgressionSchools(input: ExportArgs): [Institution]
allFunderNSCSubjectSchools(input: ExportArgs): [Institution]
allFunderTestSchools(input: ExportArgs): [Institution]
# school data exports
exportFunderSchoolEnrolment(input: ExportArgs): [SchoolEnrolmentData]
exportFunderSchoolAttendance(input: ExportArgs): [SchoolAttendanceData]
exportFunderSchoolPromotion(input: ExportArgs): [SchoolPromotionData]
exportFunderNSCSubjectData(input: ExportArgs): [NSCSubjectData]
exportFunderNSCProgressionData(input: ExportArgs): [NSCProgressionData]
exportFunderSchoolSubjectReportData(input: ExportArgs): [SchoolSubjectReportData]
exportFunderTestPerformance(input: ExportArgs): [TestPerformanceData]
exportFunderSchoolEducator(input: ExportArgs): [SchoolEducator]
# attribute exports
exportFunderServiceProviders(input: ExportArgs): [ServiceProvider]
exportFunderInterventions(input: ExportArgs): [Intervention]
exportFunderSchools(input: ExportArgs): [Institution]
funderStakeholders(input: ExportArgs): [TreatmentGroup]
# funder subject pass rate
funderSubjectPassRate(input: FilterArgs): [Subject]
# funder team members
allFunderUsers(input: UserFilterInput!): UserConnection
# funder reports
getFunderReports(serviceProviderIds: [String], searchTerm: String, reportType: String): [Report]
}
type Activity {
interventionIds: String
interventionNames: String
interventionSubjects: String
interventionFocusSubjects: String
interventionGrades: String
interventionClass: String
interventionStartDate: String
interventionEndDate: String
programmeNames: String
serviceProviderNames: String
programmeIds: String
serviceProviderIds: String
attendanceRate: String
institutionCount: Int
plannedAttendees: Int
captureType: String
tagNames: String
createdAt: DateTime!
updatedAt: DateTime!
id: ID!
actualDuration: Int
attachment: String
attendeeType: AttendeeType
class: String
description: String
endDate: DateTime
grade: String
group: Boolean
interventionName: String
name: String!
numberOfAttendees: Int
numberOfSessions: Int
numberOfActualSessions: Int
occurence: Int
plannedDuration: Int
sessionDuration: Int
startDate: DateTime
year: Int
intervention: [Intervention]
audienceSize: AudienceSize
audienceType: AudienceType
grades(
where: GradeWhereInput
orderBy: GradeOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Grade!]
groupInstitutions(
where: InstitutionWhereInput
orderBy: InstitutionOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Institution!]
frequency: Frequency
frequencyType: FrequencyType
institutions(
where: InstitutionWhereInput
orderBy: InstitutionOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Institution!]
interfaceType: InterfaceType
inputTypes(
where: InputTypeWhereInput
orderBy: InputTypeOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [InputType!]
inputs(
where: InputWhereInput
orderBy: InputOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Input!]
interventions(
where: InterventionWhereInput
orderBy: InterventionOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Intervention!]
programmes(
where: ProgrammeWhereInput
orderBy: ProgrammeOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Programme!]
serviceProviders(
where: ServiceProviderWhereInput
orderBy: ServiceProviderOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [ServiceProvider!]
sessions(
where: ActivitySessionWhereInput
orderBy: ActivitySessionOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [ActivitySession!]
sessionAttendees(
where: TreatmentGroupWhereInput
orderBy: TreatmentGroupOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [TreatmentGroup!]
archivedSessionAttendees(
where: TreatmentGroupWhereInput
orderBy: TreatmentGroupOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [TreatmentGroup!]
stakeholderRole: StakeholderType
subject: Subject
targetAudience: TargetAudience
targetGroup: TargetGroup
topicsCovered: String
type: ActivityType
tags(
where: TagWhereInput
orderBy: TagOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Tag!]
}
type Input {
createdAt: DateTime!
updatedAt: DateTime!
id: ID!
programmeNames: String
serviceProviderNames: String
type: InputType!
utilizationTracking: Boolean
frequencyType: FrequencyType
category: InputCategory!
description: String!
quantity: Int!
overallTime: Int
treatmentTime: Int
budgetedAmount: Float
receivedAmount: Float
frequency: Frequency
frequencyInt: Int
distributed: Boolean
retrieved: Boolean
activity: Activity
interventions(
where: InterventionWhereInput
orderBy: InterventionOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Intervention!]
intervention: Intervention
}
type Funder {
createdAt: DateTime!
updatedAt: DateTime!
id: ID!
status: UserStatus
contactPerson: String
contactPersonContactNumber: String
contactPersonEmail: String
description: String
leaderContactNumber: String
leaderEmail: String
leaderTitle: String
name: String!
newLeadersId: String
organisationLeader: String
physicalAddress: String
website: String
interventions: [Intervention]
institutions: [Institution]
serviceProviders(
where: ServiceProviderWhereInput
orderBy: ServiceProviderOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [ServiceProvider!]
users(
where: UserWhereInput
orderBy: UserOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [User!]
programmes(
where: ProgrammeWhereInput
orderBy: ProgrammeOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Programme!]
reports(
where: ReportWhereInput
orderBy: ReportOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Report!]
}
input SearchData {
first: Int
searchTerm: String
before: ID
after: ID
last: Int
skip: Int
}
type SchoolEducator {
createdAt: DateTime!
id: ID!
updatedAt: DateTime!
year: Int
term: String
circuit: String
district: District
emisNumber: Int
educatorName: String
attendanceRate: Int
daysAbsent: Int
institution: Institution
serviceProviderNames: String
programmeNames: String
interventionFocusSubjects: String
interventionSubjects: String
interventionGrades: String
interventionClass: String
interventionNames: String
interventionIds: String
}
type SchoolSubjectReportData {
createdAt: DateTime!
id: ID!
updatedAt: DateTime!
averageMark: Float
class: String
cluster: String
emisNumber: Int
level1: Int
level2: Int
level3: Int
level4: Int
level5: Int
level6: Int
level7: Int
numberAbsent: Int
numberEnrolled: Int
numberWrote: Int
passRate: Float
prevPromStatus: String
term: String
year: String
circuit: String
district: District
grade: Grade
institution: Institution
promotionStatus: PromotionStatus
province: Province
region: Region
subject: Subject
serviceProviderNames: String
programmeNames: String
interventionFocusSubjects: String
interventionSubjects: String
interventionGrades: String
interventionClass: String
interventionNames: String
interventionIds: String
}
type NSCProgressionData {
createdAt: DateTime!
id: ID!
updatedAt: DateTime!
class: String
cluster: String
emisNumber: Int
numberAchieved: Int
numberAchievedProgressed: Int
numberBachelors: Int
numberDiploma: Int
numberEnrolled: Int
numberHigherCertificate: Int
numberNscFail: Int
numberNscPass: Int
numberProgressed: Int
numberWrote: Int
percentageAchieved: String
percentageBachelors: String
percentageDiploma: String
percentageHigherCertificate: String
percentageNSCFail: String
percentageNSCPass: String
term: String
treatment: Boolean
year: String
circuit: String
district: District
grade: Grade
institution: Institution
promotionStatus: PromotionStatus
province: Province
region: Region
subject: Subject
serviceProviderNames: String
programmeNames: String
interventionFocusSubjects: String
interventionSubjects: String
interventionGrades: String
interventionClass: String
interventionNames: String
interventionIds: String
}
type NSCSubjectData {
createdAt: DateTime!
id: ID!
updatedAt: DateTime!
class: String
cluster: String
emisNumber: Int
numberAchieved: Int
numberAchievedProgressedLearners: Int
numberAchievedWithDistinction: Int
numberEnrolled: Int
numberProgressedLearners: Int
numberWrote: Int
numberWroteProgressedLearners: Int
percentageAchieved: String
percentageAchievedProgressedLearners: String
percentageAchievedWithDistinction: String
term: String
treatment: Boolean
year: String
circuit: String
district: District
grade: Grade
institution: Institution
promotionStatus: PromotionStatus
province: Province
region: Region
subject: Subject
serviceProviderNames: String
programmeNames: String
interventionFocusSubjects: String
interventionSubjects: String
interventionGrades: String
interventionClass: String
interventionNames: String
interventionIds: String
}
type SchoolAttendanceData {
createdAt: DateTime!
id: ID!
updatedAt: DateTime!
absentDays: Int
absenteeismRate: String
actualAttendance: Int
attendanceRate: String
circuit: String
emisNumber: Int
numberEnrolled: Int
possibleAttendance: Int
term: String
year: Int
district: District
grade: Grade
institution: Institution
serviceProviderNames: String
programmeNames: String
interventionFocusSubjects: String
interventionSubjects: String
interventionGrades: String
interventionClass: String
interventionNames: String
interventionIds: String
}
type SchoolPromotionData {
createdAt: DateTime!
id: ID!
updatedAt: DateTime!
circuit: String
district: District
emisNumber: Int
grade: Grade
gradeAverage: String
numberEnrolled: Int
numberPassed: Int
numberWrote: Int
percentagePassed: String
promotionStatus: PromotionStatus
term: String
year: String
institution: Institution
serviceProviderNames: String
programmeNames: String
interventionFocusSubjects: String
interventionSubjects: String
interventionGrades: String
interventionClass: String
interventionNames: String
interventionIds: String
}
type User {
createdAt: DateTime!
id: ID!
updatedAt: DateTime!
email: String!
firstName: String
lastName: String
status: UserStatus
role: UserRole
gender: String
embedCode: String
serviceProvider: String
idNum: String
designation: String
contactNumber: String
funder: Funder
interventions(
where: InterventionWhereInput
orderBy: InterventionOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Intervention!]
activities(
where: ActivityWhereInput
orderBy: ActivityOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Activity!]
lastLogin: DateTime
}
input FilteredActivitiesInput {
interventionIds: [String!]
}
input FilterArgs {
programmeId: ID
subjectId: ID
districtId: ID
interventionId: ID
gradeIds: [ID]
startDate: DateTime
endDate: DateTime
first: Int
last: Int
after: ID
before: ID
searchTerm: String
serviceProviderIds: [ID]
isArchived: Boolean
}
input ExportArgs {
searchTerm: String
year: String
startDate: DateTime
endDate: DateTime
activityIds: [ID]
programmeIds: [ID]
serviceProviderIds: [ID]
schoolIds: [ID]
interventionIds: [ID]
stakeholderTypeId: ID
stakeholderType: String
level: String
granularity: String
}
type Subject {
createdAt: DateTime!
id: ID!
updatedAt: DateTime!
firstPassRate: Float
secondPassRate: Float
thirdPassRate: Float
fourthPassRate: Float
overallPassRate: Float
description: String
grade: String
languageLevel: String
nationalCode: Int
institution: Institution
name: String
}
type PromotionRate {
term: String
year: String
mean: String
}
input FilterInterventions {
searchTerm: String
institutionId: ID
programmeId: ID
typeId: ID
}
input FilterInstitutions {
name: String
districtId: ID
typeId: ID
first: Int
last: Int
before: ID
after: ID
skip: Int
isArchived: Boolean
}
input FilterProgrammes {
searchTerm: String
isArchived: Boolean
interventionIds: [ID!]
serviceProviderIds: [ID!]
}
type SchoolEnrolmentData {
createdAt: DateTime!
id: ID!
updatedAt: DateTime!
emisNumber: Int
numberEnrolled: Int
numberWithoutID: Int
term: String
year: String
circuit: String
district: District
grade: Grade
institution: Institution
promotionStatus: String
serviceProviderNames: String
programmeNames: String
interventionFocusSubjects: String
interventionSubjects: String
interventionGrades: String
interventionClass: String
interventionNames: String
interventionIds: String
}
type ServiceProvider {
# enums
legalStructure: LegalStructure
roles: ServiceProviderRole
type: ServiceProviderType
# scalars
idNum: String
designation: String
address: String
contactNumber: String
description: String
email: String
execInCharge: String
firstContactPerson: String
firstContactPersonEmail: String
firstContactPersonNumber: String
createdAt: DateTime!
id: ID!
updatedAt: DateTime!
isArchived: Boolean
logo: String
name: String!
orgLeader: String
orgLeaderDesignation: String
orgLeaderNumber: String
orgLeaderPersonEmail: String
physicalAddress: String
registrationNumber: String
secondContactPerson: String
secondContactPersonEmail: String
secondContactPersonNumber: String
title: String
website: String
# relations
institutions: [Institution]
interventions: [Intervention]
programmes: [Programme]
funder: [Funder]
# custom properties
schoolCount: Int
teacherCount: Int
learnerCount: Int
beneficiariesCount: Int
mathsPassRate: Float
englishPassRate: Float
sciencePassRate: Float
subjects: [Subject]
users: [User]
}
type Intervention {
createdAt: DateTime!
id: ID!
updatedAt: DateTime!
activityCount: Int
beneficiaryCount: Int
schoolCount: Int
serviceProviderNames: String
focusNames: String
gradeValues: String
focusSubjectNames: String
outcomeThemesNames: String
impactThemesNames: String
class: String
beneficiaries: BeneficiaryType
subject: Subject
accredited: Boolean
accreditation: String
name: String!
description: String
theoryOfChange: String
fromDate: DateTime
toDate: DateTime
treatmentGroup: StakeholderType
grades(
where: GradeWhereInput
orderBy: GradeOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Grade!]
grade: String
interventionType: InterventionType
focus(
where: InterventionFocusWhereInput
orderBy: InterventionFocusOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [InterventionFocus!]
focusSubjects(
where: InterventionFocusSubjectWhereInput
orderBy: InterventionFocusSubjectOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [InterventionFocusSubject!]
phase: InterventionPhase
outcomeThemes(
where: OutcomeThemeWhereInput
orderBy: OutcomeThemeOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [OutcomeTheme!]
outcomes(
where: OutcomeWhereInput
orderBy: OutcomeOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Outcome!]
impactThemes(
where: ImpactThemeWhereInput
orderBy: ImpactThemeOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [ImpactTheme!]
impactGoals(
where: ImpactGoalWhereInput
orderBy: ImpactGoalOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [ImpactGoal!]
teamMembers(
where: UserWhereInput
orderBy: UserOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [User!]
cohort(
where: ProfileWhereInput
orderBy: ProfileOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Profile!]
budgetedAmount: Int
receivedAmount: Int
spentAmount: Int
overallTime: Int
treatmentTime: Int
year: Int
treatmentGroups(
where: TreatmentGroupWhereInput
orderBy: TreatmentGroupOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [TreatmentGroup!]
institutions(
where: InstitutionWhereInput
orderBy: InstitutionOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Institution!]
indicators(
where: IndicatorWhereInput
orderBy: IndicatorOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Indicator!]
indicatorTypes(
where: IndicatorTypeWhereInput
orderBy: IndicatorTypeOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [IndicatorType!]
inputs(
where: InputWhereInput
orderBy: InputOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Input!]
activities(
where: ActivityWhereInput
orderBy: ActivityOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Activity!]
programme: Programme
serviceProviders(
where: ServiceProviderWhereInput
orderBy: ServiceProviderOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [ServiceProvider!]
stakeholders(
where: StakeholderWhereInput
orderBy: StakeholderOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Stakeholder!]
}
type Institution {
createdAt: DateTime!
id: ID!
updatedAt: DateTime!
customNoFeeSchool: String
beneficiaryCount: Int
learnerCount: Int
teacherCount: Int
mathsPassRate: Float
englishPassRate: Float
sciencePassRate: Float
interventionGrades: String
interventionNames: String
interventionIds: String
programmeNames: String
interventionSubjects: String
interventionFocusSubjects: String
serviceProviderNames: String
interventionClass: String
addressee: String
allocation: String
cellNumber: String
circuit: String
circuitManagerContactNumber: String
circuitManagerEmailAddress: String
circuitManagerName: String
componentNumber: Int
contactNumber: String
contactPerson: String
control: Boolean
districtContactNumber: String
districtEmailAddress: String
districtMunicipalityName: String
educatorNumber: Int
email: String
emisNumber: String
exDept: String
examCentre: String
examNumber: Int
facsimile: Int
gisLatitude: String
gisLongitude: String
gisSource: String
hod: String
hodContact: String
hodEmail: String
isArchived: Boolean
learnerNumber: Int
localMunicipalityName: String
magisterialDistrict: String
name: String!
nas: String
newLeadersId: String
noFeeSchool: Boolean
nodalArea: String
numberOfCircuits: Int
numberOfDistricts: Int
numberOfSchools: Int
officeContactNumber: String
officeEmailAddress: String
openBoardingSchool: String
ownerBuild: String
ownerLand: String
ownership: String
paypointNumber: Int
physicalAddress: String
postalAddress: String
principalContactNumber: String
principalEmailAddress: String
principalName: String
provinceCD: Int
quintile: String
region: String
registrationDate: String
section21: String
section21Function: String
specialization: String
status: String
streetAddress: String
suburb: String
telephone: String
townCity: String
townshipVillage: String
treatment: Boolean
urbanRural: String
wardID: Int
year: Int
beneficiaries(
where: BeneficiaryWhereInput
orderBy: BeneficiaryOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Beneficiary!]
country: Country
district: District
fundingClassification: FundingClass
location: Location
interventionRole: InterventionRole
interventions(
where: InterventionWhereInput
orderBy: InterventionOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Intervention!]
phase: SchoolPhase
province: Province
schoolData(
where: SchoolDataWhereInput
orderBy: SchoolDataOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [SchoolData!]
schoolPromotionData(
where: SchoolPromotionDataWhereInput
orderBy: SchoolPromotionDataOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [SchoolPromotionData!]
sector: EducationSector
serviceProviderSchool(
where: ServiceProviderSchoolWhereInput
orderBy: ServiceProviderSchoolOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [ServiceProviderSchool!]
serviceProviders(
where: ServiceProviderWhereInput
orderBy: ServiceProviderOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [ServiceProvider!]
specializationGroup: SchoolSpecialisationGroup
stakeholders(
where: StakeholderWhereInput
orderBy: StakeholderOrderByInput
skip: Int
after: String
before: String
first: Int
last: Int
): [Stakeholder!]
type: InstitutionType
schoolType: SchoolType
}
type TestPerformanceData {
createdAt: DateTime!
id: ID!
updatedAt: DateTime!
pSciencePassRate: Float
mathsPassRate: Float
englishPassRate: Float
serviceProviderNames: String
programmeNames: String
interventionFocusSubjects: String
interventionSubjects: String
interventionGrades: String
interventionClass: String
interventionNames: String
institution: Institution
grade: Grade
district: District
subject: Subject
averageMark: Float
circuit: String
emisNumber: Int
level1: Int
level2: Int
level3: Int
level4: Int
level5: Int
level6: Int
level7: Int
numberAbsent: Int
numberEnrolled: Int
numberWrote: Int
passRate: Float
possibleAttendance: Int
prevPromStatus: String
term: String
year: Int
}
type Programme {
createdAt: DateTime!
id: ID!
updatedAt: DateTime!
fromDate: DateTime
toDate: DateTime
name: String
summary: String
theoryOfChange: String
interventions: [Intervention]
serviceProviders: [ServiceProvider]
funder: [Funder]
isArchived: Boolean
# custom properties
districts: Int
institutions: Int
beneficiaries: Int
interventionTypes: Int
provinces: Int
beneficiariesReached: Int
sessionsCompleted: Int
schoolsReached: Int
}
##DATAMODEL
type File {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
url: String! @unique
organisations: [Organisation!]! @relation(name: "OrganisationImage")
report: Report @relation(name: "ReportDocument")
session: ActivitySession @relation(name: "SessionDocuments")
uploadedBy: User
}
type Report {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
reportType: String
createdBy: User
files: [File!]! @relation(name: "ReportDocument")
interventions: [Intervention!]!
programme: Programme
serviceProvider: ServiceProvider
funder: Funder @relation(name: "FunderReports")
}
type Stakeholder {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
additionalInstitution: Boolean
branch: String
contactNumber: String
dateExited: DateTime
dateOfBirth: DateTime
dateStarted: DateTime
designation: String
disability: Boolean
emailAddress: String
emisNumber: Int
highestQualificationId: String
ictSkill: Int
leadEducator: Boolean
localMunicipality: String
multiGrade: Boolean
name: String
nationalID: String
otherRole: String
ovc: Boolean
personalNumber: String
postLevel: Int
prePrimaryExperience: Boolean
region: String
role: String
surname: String
trackingId: String
yearsInGrade: Int
yearsInPhase: Int
yearsOfExperience: Int
communityType: CommunityType
country: Country
district: District
educatorLevel: EducatorLevel
gender: Gender
grades: [Grade]
highestQualification: [HighestQualification]
homeLanguage: Language
interventions: [Intervention!]!
institutions: [Institution]
interventionRole: InterventionRole
natureOfEmployment: NatureOfEmployment
personnelPosition: PersonnelPosition
phase: StakeholderPhase
province: Province
populationGroup: PopulationGroup
renumerationSource: RenumerationSource
subjects: [Subject]
reasonForTermination: [ReasonForExit]
type: StakeholderType
}
type StakeholderPhase {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type ReasonForTermination {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type CommunityType {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type Country {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type StakeholderRole {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
treatmentGroups: [TreatmentGroup!]! @relation(name: "TreatmentGroupRoles")
}
type StakeholderType {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
activities: [Activity!]! @relation(name: "ActivityStakeholderRole")
}
type Language {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type Location {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type FundingClass {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type PersonnelPosition {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type NatureOfEmployment {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type EducatorLevel {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type HighestQualification {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type RenumerationSource {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type PopulationGroup {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type DisabilityType {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type Gender {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type ReasonForExit {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type InterventionRole {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type Funder {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
contactPerson: String
contactPersonContactNumber: String
contactPersonEmail: String
description: String
leaderContactNumber: String
leaderEmail: String
leaderTitle: String
name: String! @unique
newLeadersId: String
organisationLeader: String
physicalAddress: String
website: String
serviceProviders: [ServiceProvider!]! @relation(name: "FunderServiceProviders")
users: [User!]! @relation(name: "FunderUsers")
programmes: [Programme!]! @relation(name: "FunderProgrammes")
reports: [Report!]! @relation(name: "FunderReports")
}
type User {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
# enums
status: UserStatus
role: UserRole
# scalars
address: String
contactNumber: String
designation: String
email: String! @unique
firstName: String
gender: String
idNum: String
lastLogin: DateTime
lastName: String
otp: String
password: String
serviceProvider: String
token: String
# relationships
activities: [Activity!]!
funder: Funder @relation(name: "FunderUsers")
interventions: [Intervention!]! @relation(name: "UsersOfIntervention")
}
type Organisation {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
code: String
address: String
size: Float
valuation: Float
rooms: Float
erfNumber: Float
image: File @relation(name: "OrganisationImage")
status: OrganisationStatus
salesAgent: String
}
type District {
id: ID! @unique
name: String!
institutions: [Institution!]!
}
type Circuit {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String!
}
enum OrganisationStatus {
ACTIVE
ARCHIVED
}
enum UserStatus {
ACTIVE
ARCHIVED
}
enum UserRole {
ADMIN
SUPERADMIN
FIELD_AGENT
FIELD_MEMBER
FUNDER_ADMIN
SERVICE_PROVIDER_ADMIN
EXECUTIVE
MANAGER
}
type Attendance {
id: ID! @unique
activity: Activity!
session: Int!
user: Profile!
date: DateTime!
attended: Boolean!
}
type SchoolSubjectList {
id: ID! @unique
description: String
grade: String
languageLevel: String
nationalCode: Int
schoolReference: String
}
type SchoolAttendanceData {
id: ID! @unique
absentDays: Int
absenteeismRate: String
actualAttendance: Int
attendanceRate: String
circuit: String
emisNumber: Int
numberEnrolled: Int
possibleAttendance: Int
term: String
year: Int
district: District
grade: Grade
institution: Institution
}
type SchoolEducator {
id: ID! @unique
year: Int
term: String
circuit: String
district: District
emisNumber: Int
educatorName: String
attendanceRate: String
daysAbsent: Int
institution: Institution
}
type TestPerformanceData {
id: ID! @unique
averageMark: Float
circuit: String
emisNumber: Int
level1: Int
level2: Int
level3: Int
level4: Int
level5: Int
level6: Int
level7: Int
numberAbsent: Int
numberEnrolled: Int
numberWrote: Int
passRate: Float
possibleAttendance: Int
promotionStatus: String
term: String
year: Int
district: District
grade: Grade
subject: Subject
institution: Institution
}
enum LegalStructure {
VOLUNTARY_ASSOCIATION
TRUST
NON_PROFIT_COMPANY
COMMUNAL_PROPERTY_ASSOCIATION
SOLE_PROPRIETORSHIP
PARTNERSHIP
INCORPORATED_PROFESSIONAL_PRACTICE
CLOSE_CORPORATION
PRIVATE_COMPANY
PUBLIC_COMPANY
CO_OPERATIVE
STATE_OWNED_COMPANY
}
enum ServiceProviderType {
NPO
SOCIAL_ENTERPRISE
SMME
CORPORATE
}
enum ServiceProviderRole {
IMPLEMENTER
SUPPLIER
}
enum OtherClassification {
COMBINED
AGRIC_SEC
COMP_SEC
INTERMEDIATE
ORDINARY_SEC
PRIMARY
SPECIAL
SPECIALISED
TECH_SEC
}
type ServiceProvider {
# enums
legalStructure: LegalStructure
roles: ServiceProviderRole
type: ServiceProviderType
# scalars
address: String
contactNumber: String
description: String
email: String
execInCharge: String
firstContactPerson: String
firstContactPersonEmail: String
firstContactPersonNumber: String
id: ID! @unique
isArchived: Boolean @default(value: "false")
logo: String
name: String!
orgLeader: String
orgLeaderDesignation: String
orgLeaderNumber: String
orgLeaderPersonEmail: String
physicalAddress: String
registrationNumber: String
secondContactPerson: String
secondContactPersonEmail: String
secondContactPersonNumber: String
title: String
website: String
# relations
funder: Funder @relation(name: "FunderServiceProviders")
institutions: [Institution!]!
interventions: [Intervention!]! @relation(name: "ServiceProvidersOfIntervention")
programmes: [Programme!]! @relation(name: "ServiceProvidersOfProgram")
treatmentGroups: [TreatmentGroup!]! @relation(name: "ServiceProviderTreatmentGroup")
}
type Outcome {
id: ID! @unique
name: String!
description: String!
queries: [String!]!
unit: [String!]!
measurementUnit: [String!]!
outcomeTheme: OutcomeTheme @relation(name: "OutcomesOfOutcomeThemes")
interventions: [Intervention!]!
}
type Indicator {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
# Scalars
measurementUnit: String # from outcome/impactGoal
name: String! # from outcome/impactGoal
unit: String # from outcome/impactGoal
variable: String # from input/activity
label: String
startDate: DateTime
endDate: DateTime
numberOfDataEntries: Int
target: Boolean
targetValue: String
# Relationship
outcomeTheme: OutcomeTheme @relation(name: "OutcomeThemeIndicators")
impactTheme: ImpactTheme @relation(name: "ImpactThemeIndicators")
intervention: Intervention @relation(name: "InterventionIndicators")
}
type IndicatorType {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
# Scalars
measurementUnit: String
name: String!
definition: String
unit: String
dataCategory: String
# Relationship
outcomeTheme: OutcomeTheme @relation(name: "OutcomeThemeIndicators")
impactTheme: ImpactTheme @relation(name: "ImpactThemeIndicators")
}
type OutcomeTheme {
id: ID! @unique
name: String!
description: String!
outcomes: [Outcome!]! @relation(name: "OutcomesOfOutcomeThemes")
indicators: [Indicator!]! @relation(name: "OutcomeThemeIndicators")
interventions: [Intervention!]!
}
type ImpactGoal {
id: ID! @unique
name: String!
description: String!
queries: [String!]!
unit: String
measurementUnit: String
impactTheme: ImpactTheme @relation(name: "ImpactGoalsOfImpactThemes")
interventions: [Intervention!]!
}
type ImpactTheme {
id: ID! @unique
name: String!
description: String!
impactGoals: [ImpactGoal!]! @relation(name: "ImpactGoalsOfImpactThemes")
indicators: [Indicator!]! @relation(name: "ImpactThemeIndicators")
interventions: [Intervention!]! @relation(name: "ImpactThemesOfIntervention")
}
type Input {
id: ID! @unique
type: InputType! @relation(name: "InputTypes")
utilizationTracking: Boolean
frequencyType: FrequencyType
category: InputCategory!
description: String!
quantity: Int!
overallTime: Int
treatmentTime: Int
budgetedAmount: Float
receivedAmount: Float
frequency: Frequency
frequencyInt: Int
distributed: Boolean @default(value: "false")
retrieved: Boolean @default(value: "false")
activity: [Activity!]! @relation(name: "ActivitiesOfInput")
interventions: [Intervention!]! @relation(name: "InputsOfIntervention")
}
type InputQuantity {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
quantity: Int
inputType: [InputType!]!
activity: [Activity!]!
}
type Profile {
# enums
disabilityType: DisabilityType
district: District
educationSector: EducationSector
gender: Gender
grade: Grade
highestQualification: HighestQualification
homeLanguage: Language
ictSkill: IctSkill
personnelPosition: PersonnelPosition
populationGroup: PopulationGroup
natureOfEmployment: NatureOfEmployment
renumerationSource: RenumerationSource
schoolPhase: SchoolPhase
schoolSpecialisation: String
schoolSpecialisationGroup: String
teacherLevel: EducatorLevel
# scalars
accessionNumber: String
additionalInstitution: Boolean
circuitManagerName: String
cmAlternativeEmailAddress: String
cmContactNumber: String
cmEmailAddress: String
contactNum: String
dateAdmitted: DateTime
dateStarted: DateTime
dateTerminated: DateTime
designation: String
disability: Boolean
dob: DateTime
email: String
emisNum: String
experienceYears: Int
firstName: String!
generalId: String
id: ID! @unique
institutionUniqueID: String
interventionRole: String
lastName: String!
latitude: String
longitude: String
masterEducator: Boolean
multigrade: Boolean
nationalID: String
noFeeSchool: Boolean
numberEducators: Int
numberLearners: Int
ovc: Boolean
personalNumber: String
physicalAddress: String
postLevel: Int
preprimaryexp: Boolean
prevYearPromotionStatus: String
principalContactNumber: String
principalName: String
quintile: Quintile
reasonForTermination: String
region: String
role: String
schoolContactNumber: String
schoolEmailAddress: String
systemUniqueId: String
yearsInGrade: Int
yearsInPhase: Int
# relations
activities: [Activity!]! @relation(name: "ActivitiesOfStudents")
institution: [Institution!]!
teachesSubjects: [Subject!]!
type: ProfileType
}
type SchoolSubjectReportData {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
averageMark: Float
class: String
cluster: String
emisNumber: Int
level1: Int
level2: Int
level3: Int
level4: Int
level5: Int
level6: Int
level7: Int
numberAbsent: Int
numberEnrolled: Int
numberWrote: Int
passRate: Float
prevPromStatus: String
term: String
year: String
circuit: String
district: District
grade: Grade
institution: Institution
promotionStatus: PromotionStatus
province: Province
region: Region
subject: Subject
}
type SchoolProgressionData {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
averageMark: Float
class: String
cluster: String
control: Boolean @default(value: "false")
emisNumber: Int
level1: Int
level2: Int
level3: Int
level4: Int
level5: Int
level6: Int
level7: Int
numberPassed: Int
numberEnrolled: Int
numberWrote: Int
passRate: Float
term: String
treatment: Boolean @default(value: "false")
year: String
circuit: String
district: District
grade: Grade
institution: Institution
promotionStatus: PromotionStatus
province: Province
region: Region
subject: Subject
}
type NSCProgressionData {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
class: String
cluster: String
emisNumber: Int
numberAchieved: Int
numberAchievedProgressed: Int
numberBachelors: Int
numberDiploma: Int
numberEnrolled: Int
numberHigherCertificate: Int
numberNscFail: Int
numberNscPass: Int
numberProgressed: Int
numberWrote: Int
percentageAchieved: String
percentageBachelors: String
percentageDiploma: String
percentageHigherCertificate: String
percentageNSCFail: String
percentageNSCPass: String
term: String
treatment: Boolean @default(value: "false")
year: String
circuit: String
district: District
grade: Grade
institution: Institution
promotionStatus: PromotionStatus
province: Province
region: Region
subject: Subject
}
type NSCSubjectData {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
class: String
cluster: String
emisNumber: Int
numberAchieved: Int
numberAchievedProgressedLearners: Int
numberAchievedWithDistinction: Int
numberEnrolled: Int
numberProgressedLearners: Int
numberWrote: Int
numberWroteProgressedLearners: Int
percentageAchieved: String
percentageAchievedProgressedLearners: String
percentageAchievedWithDistinction: String
term: String
treatment: Boolean @default(value: "false")
year: String
circuit: String
district: District
grade: Grade
institution: Institution
promotionStatus: PromotionStatus
province: Province
region: Region
subject: Subject
}
type Region {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type Institution {
id: ID! @unique
# Scalars
addressee: String
allocation: String
cellNumber: String
circuit: String
circuitManagerContactNumber: String
circuitManagerEmailAddress: String
circuitManagerName: String
componentNumber: Int
contactNumber: String
contactPerson: String
control: Boolean
districtContactNumber: String
districtEmailAddress: String
districtMunicipalityName: String
educatorNumber: Int
email: String
emisNumber: String @unique
exDept: String
examCentre: String
examNumber: Int
facsimile: Int
gisLatitude: String
gisLongitude: String
gisSource: String
hod: String
hodContact: String
hodEmail: String
isArchived: Boolean @default(value: "false")
learnerNumber: Int
localMunicipalityName: String
magisterialDistrict: String
name: String!
nas: String
newLeadersId: String
noFeeSchool: Boolean @default(value: "false")
nodalArea: String
numberOfCircuits: Int
numberOfDistricts: Int
numberOfSchools: Int
officeContactNumber: String
officeEmailAddress: String
openBoardingSchool: String
ownerBuild: String
ownerLand: String
ownership: String
paypointNumber: Int
physicalAddress: String
postalAddress: String
principalContactNumber: String
principalEmailAddress: String
principalName: String
provinceCD: Int
quintile: String
region: String
registrationDate: String
section21: String
section21Function: String
specialization: String
stakeholders: [Stakeholder!]!
status: String
streetAddress: String
suburb: String
telephone: String
townCity: String
townshipVillage: String
treatment: Boolean
urbanRural: String
wardID: Int
year: Int
#relationship
activities: [Activity!]! @relation(name: "ActivityInstitutions")
beneficiaries: [Beneficiary!]!
country: Country
district: District
fundingClassification: FundingClass
groupActivities: [Activity!]! @relation(name: "GroupInstitutions")
location: Location
interventions: [Intervention!]! @relation(name: "InterventionInstitutions")
interventionRole: InterventionRole
phase: SchoolPhase
province: Province
schoolData: [SchoolData!]!
schoolPromotionData: [SchoolPromotionData!]!
sector: EducationSector
serviceProviderSchool: [ServiceProviderSchool!]!
serviceProviders: [ServiceProvider!]!
specializationGroup: SchoolSpecialisationGroup
schoolType: SchoolType
type: InstitutionType
}
type TreatmentGroup {
id: ID! @unique
careGiverType: String
careGiverRelationship: String
careGiverName: String
careGiverSurname: String
careGiverGender: String
careGiverNationalId: String
careGiverMaritalStatus: String
careGiverContactNumber: String
careGiverEmailAddress: String
careGiverPhysicalAddress: String
careGiverOccupation: String
careGiverEmployer: String
additionalInstitution: Boolean
beneficiaryType: String
branch: String
contactNumber: String
dateExited: DateTime
dateOfBirth: DateTime
dateStarted: DateTime
designation: String
disability: Boolean
disabilityType: DisabilityType
emailAddress: String
emisNumber: Int
firstName: String
highestQualificationId: String
ictSkill: Int
interventionClass: String
interventionEndDate: DateTime
interventionGrade: String
interventionName: String
interventionStartDate: DateTime
interventionSubject: String
leadEducator: Boolean
localMunicipality: String
multiGrade: Boolean
name: String
nationalID: String
otherRole: String
ovc: Boolean
persalNumber: String
postLevel: Int
prePrimaryExperience: Boolean
programmeName: String
trackingId: String
region: String
serviceProviderName: String
lastName: String
year: Int
yearsInGrade: Int
yearsInPhase: Int
yearsOfExperience: Int
activities: [Activity!]! @relation(name: "AttendeeActivities")
attendance: [SessionAttendance!]! @relation(name: "AttendanceRecord")
communityType: CommunityType
country: Country
district: District
educatorLevel: EducatorLevel
gender: Gender
grades: [Grade!]
highestQualification: [HighestQualification]
homeLanguage: Language
institutions: [Institution!]! @relation(name: "TreatmentGroupAdditionalInstitutions")
interventionRole: InterventionRole
interventions: [Intervention!]! @relation(name: "TreatmentGroupIntervention")
natureOfEmployment: NatureOfEmployment
personnelPosition: PersonnelPosition
phase: StakeholderPhase
populationGroup: PopulationGroup
primaryInstitution: Institution @relation(name: "TreatmentGroupPrimaryInstitution")
programme: Programme @relation(name: "TreatmentGroupPrograms")
province: Province
reasonForTermination: [ReasonForExit]
renumerationSource: RenumerationSource
role: StakeholderRole @relation(name: "TreatmentGroupRoles")
serviceProvider: [ServiceProvider!]! @relation(name: "ServiceProviderTreatmentGroup")
sessionActivities: [Activity!]! @relation(name: "ActivitySessionAttendees")
sessions: [ActivitySession!]! @relation(name: "SessionAttendees")
status: UserStatus
subjects: [Subject!]!
type: StakeholderType
}
type SessionAttendance {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
session: ActivitySession @relation(name: "AttendedSession")
attendee: TreatmentGroup @relation(name: "AttendanceRecord")
}
type Subject {
id: ID! @unique
description: String
grade: String
languageLevel: String
nationalCode: Int
institution: Institution
name: String
intervention: Intervention @relation(name: "InterventionSubject")
}
type Activity {
id: ID! @unique
actualDuration: Int
attachment: String
attendeeType: AttendeeType
class: String
description: String
endDate: DateTime
grade: String
group: Boolean @default(value: "false")
interventionName: String
name: String!
numberOfAttendees: Int
numberOfSessions: Int
occurence: Int @default(value: "0")
plannedDuration: Int
sessionDuration: Int
startDate: DateTime
year: Int
audienceSize: AudienceSize
audienceType: AudienceType
grades: [Grade!]!
groupInstitutions: [Institution!]! @relation(name: "GroupInstitutions")
frequency: Frequency
frequencyType: FrequencyType
institutions: [Institution!]! @relation(name: "ActivityInstitutions")
interfaceType: InterfaceType
inputTypes: [InputType]
inputs: [Input!]! @relation(name: "ActivitiesOfInput")
interventions: [Intervention!]! @relation(name: "ActivitiesOfIntervention")
programmes: [Programme!]! @relation(name: "ProgrammeActivities")
serviceProviders: [ServiceProvider!]! @relation(name: "ServiceProviderActivities")
sessions: [ActivitySession!]! @relation(name: "ActivitySessions")
sessionAttendees: [TreatmentGroup!]! @relation(name: "ActivitySessionAttendees")
stakeholderRole: StakeholderType @relation(name: "ActivityStakeholderRole")
subject: Subject
targetAudience: TargetAudience
targetGroup: TargetGroup
topicsCovered: String
type: ActivityType
}
type ActivitySession {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
actualDate: DateTime
actualDuration: Int
additionalNotes: String
approved: Boolean @default(value: "false")
attendees: Int
description: String
flagged: Boolean @default(value: "false")
reasonForFlagging: String
group: Boolean @default(value: "false")
name: String
numberOfAttendees: Int
plannedDate: DateTime
plannedDuration: Int
sessionStatus: SessionStatus
activity: Activity @relation(name: "ActivitySessions")
approvedBy: User @relation(name: "ApprovedBy")
createdBy: User @relation(name: "CreatedBy")
files: [File!]! @relation(name: "SessionDocuments")
flaggedby: User @relation(name: "FlaggedBy")
institutions: [Institution!]! @relation(name: "SessionInstitutions")
sessionAttendees: [TreatmentGroup!]! @relation(name: "SessionAttendees")
stakeholderRole: StakeholderType
}
type Beneficiary {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
type: String
firstName: String
lastName: String
institution: Institution
}
type Intervention {
id: ID! @unique
accreditation: String
accredited: Boolean @default(value: "false")
budgetedAmount: Int
class: String
description: String
fromDate: DateTime
grade: String
name: String!
overallTime: Int
receivedAmount: Int
spentAmount: Int
subject: Subject @relation(name: "InterventionSubject")
theoryOfChange: String
toDate: DateTime
treatmentTime: Int
year: Int
activities: [Activity!]! @relation(name: "ActivitiesOfIntervention")
beneficiaries: BeneficiaryType
cohort: [Profile!]!
focus: [InterventionFocus!]!
focusSubjects: [InterventionFocusSubject!]! @relation(name: "InterventionFocusSubjects")
grades: [Grade!]! @relation(name: "InterventionGrades")
impactGoals: [ImpactGoal!]!
impactThemes: [ImpactTheme!]! @relation(name: "ImpactThemesOfIntervention")
indicators: [Indicator!]! @relation(name: "InterventionIndicators")
inputs: [Input!]! @relation(name: "InputsOfIntervention")
institutions: [Institution!]! @relation(name: "InterventionInstitutions")
outcomeThemes: [OutcomeTheme!]!
outcomes: [Outcome!]!
phase: InterventionPhase
programme: Programme @relation(name: "InterventionsOfProgram")
serviceProviders: [ServiceProvider!]! @relation(name: "ServiceProvidersOfIntervention")
stakeholders: [Stakeholder!]!
teamMembers: [User!]! @relation(name: "UsersOfIntervention")
treatmentGroup: StakeholderType
treatmentGroups: [TreatmentGroup!]! @relation(name: "TreatmentGroupIntervention")
type: InterventionType
}
type Programme {
id: ID! @unique
fromDate: DateTime
toDate: DateTime
name: String!
summary: String
isArchived: Boolean @default(value: "false")
theoryOfChange: String
funder: Funder @relation(name: "FunderProgrammes")
treatmentGroups: [TreatmentGroup!]! @relation(name: "TreatmentGroupPrograms")
interventions: [Intervention!]! @relation(name: "InterventionsOfProgram")
serviceProviders: [ServiceProvider!]! @relation(name: "ServiceProvidersOfProgram")
}
type Task {
id: ID! @unique
name: String
description: String
admin: User @relation(name: "AdminOfTask")
taskDate: DateTime
numberOfSessions: Int
frequency: Frequency
sessions: [TaskSession!]!
fieldMembers: [User!]! @relation(name: "FieldMembersOfTasks")
intervention: Intervention
activity: Activity
type: TaskType
status: TaskStatus @default(value: "INCOMPLETE")
}
type TaskSession {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
endDate: DateTime
session: Int
startDate: DateTime
fieldMembers: [User!]!
status: TaskStatus @default(value: "INCOMPLETE")
task: Task
}
type SchoolData {
id: ID! @unique
type: SchoolDataType!
institution: Institution!
grade: Grade!
subject: SubjectName!
date: DateTime
district: String
emisNumber: String
prevYearPromotionStatus: String
promotionStatus: String
numberAbsent: String
numberProgressed: String
numberWrote: String
averageMark: String
numberLearners: String
level1: String
percentageLevel1: String
level2: String
percentageLevel2: String
level3: String
percentageLevel3: String
level4: String
percentageLevel4: String
level5: String
percentageLevel5: String
level6: String
percentageLevel6: String
level7: String
percentageLevel7: String
passRate: String
numberAchieved: String
numberBachelors: String
percentageBachelors: String
numberDiploma: String
percentageDiploma: String
numberHigherCertificate: String
percentageHigherCertificate: String
numberNscPass: String
percentageNscPass: String
numberNscFail: String
percentageNscFail: String
numberAchieved30PercentAbove: String
numberAchieved40PercentAbove: String
percentageAchieved: String
numberAchievedDistinction: String
percentageAchievedDistinction: String
enrolment: String
attendanceRate: String
absenteeismRate: String
totalAbsent: String
totalAttended: String
possibleAttended: String
}
type SchoolEnrolmentData {
id: ID! @unique
emisNumber: Int
numberEnrolled: Int
numberWithoutID: Int
term: String
year: String
circuit: String
district: District
grade: Grade
institution: Institution
promotionStatus: PromotionStatus
}
type SchoolPromotionData {
id: ID! @unique
circuit: String
district: District
emisNumber: Int
grade: Grade
gradeAverage: String
numberEnrolled: Int
numberPassed: Int
numberWrote: Int
percentagePassed: String
promotionStatus: PromotionStatus
term: String
year: String
institution: Institution
}
type Grade {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
type: GradeType
name: String
value: String
interventions: [Intervention!]! @relation(name: "InterventionGrades")
serviceProviderSchools: [ServiceProviderSchool!]!
}
type PromotionStatus {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
type BeneficiaryType {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
treatmentGroupType: TreatmentGroupType
}
type FrequencyType {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
frequency: [Frequency!]!
}
type TreatmentGroupType {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
beneficiaryType: [BeneficiaryType!]!
}
type SchoolSpecialisationGroup {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String
}
enum SessionStatus {
WAITING_FOR_REVIEW
FLAGGED
DRAFT
APPROVED
}
enum AttendeeType {
INDIVIDUAL
GROUP
}
enum TaskStatus {
ACTIVE
PAUSED
COMPLETE
INCOMPLETE
PENDING
DELETED
}
enum SubjectName {
ENGLISH
AFRIKAANS
MATHS
SCIENCE
HISTORY
}
enum SchoolDataType {
ATTENDANCE
TEST_ACHEIVEMENT_LEVELS
EXAM_ACHEIVEMENT_LEVELS
REPORT_ACHEIVEMENT_LEVELS
GR11_PROGRESSION
NSC_PROGRESSION
NSC_SUBJECTS
}
enum TaskType {
DATA_CAPTURE
ACTIVITY
}
enum MeasurementType {
NUMBER
PERCENTAGE
}
enum GradeType {
GRADE_PRE_R
GRADE_0_R
GRADE_1
GRADE_2
GRADE_3
GRADE_4
GRADE_5
GRADE_6
GRADE_7
GRADE_8
GRADE_9
GRADE_10
GRADE_11
GRADE_12
OTHER
}
type ServiceProviderSchool {
id: ID! @unique
year: Int
district: String
institutionName: String
programmeName: String
serviceProviderName: String
interventionName: String
subject: String
grade: String
class: String
emisNumber: Int
startYear: Int
contractStartDate: DateTime
contractEndDate: DateTime
institution: Institution
programme: Programme
serviceProvider: ServiceProvider
intervention: Intervention
grades: [Grade]
}
type InterventionType {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String! @unique
focus: [InterventionFocus!]!
interventions: [Intervention!]!
}
type InterventionFocus {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String! @unique
type: [InterventionType!]!
subjects: [InterventionFocusSubject!]!
}
type InterventionFocusSubject {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String! @unique
focus: [InterventionFocus!]!
interventions: [Intervention!]! @relation(name: "InterventionFocusSubjects")
}
type InputCategory {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String! @unique
type: [InputType!]!
}
type InputType {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String! @unique
category: InputCategory
quantity: InputQuantity
inputs: [Input!]! @relation(name: "InputTypes")
}
type InterventionPhase {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String! @unique
intervention: [Intervention!]!
}
type ActivityType {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String! @unique
activities: [Activity!]!
}
type AudienceType {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String! @unique
activities: [Activity!]!
}
type AudienceSize {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String! @unique
activities: [Activity!]!
}
type InterfaceType {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String! @unique
activities: [Activity!]!
}
type TargetAudience {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String! @unique
activities: [Activity!]!
targetGroup: TargetGroup
}
type TargetGroup {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String! @unique
activities: [Activity!]!
targetAudience: [TargetAudience!]!
}
type Frequency {
createdAt: DateTime!
id: ID! @unique
updatedAt: DateTime!
name: String! @unique
type: FrequencyType
}
enum Class {
ONE
TWO
THREE
FOUR
FIVE
SIX
SEVEN
EIGHT
NINE
TEN
ALL
}
enum ProfileType {
SCHOOL_OFFICIAL
LEARNER
SCHOOL
DISTRICT_OFFICIAL
}
type InstitutionType {
id: ID! @unique
name: String!
}
type SchoolType {
id: ID! @unique
name: String!
}
type Province {
id: ID! @unique
name: String!
institution: [Institution!]!
}
type SchoolPhase {
id: ID! @unique
name: String!
}
type EducationSector {
id: ID! @unique
name: String!
}
enum SchoolSpecialisation {
ADULT_BASIC_EDUCATION
AGRICULTURE
ARTS_AND_CULTURE
ART_DRAMA_MUSIC_BALLET
BORDING_SCHOOL
PRIMARY_SUBJECTS
}
enum Quintile {
ONE
TWO
THREE
FOUR
FIVE
NO_VALUE
NOT_APPLICABLE
}
enum IctSkill {
ONE
TWO
THREE
FOUR
FIVE
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment