Skip to content
This repository was archived by the owner on Jun 5, 2026. It is now read-only.

Latest commit

 

History

History
417 lines (352 loc) · 6.84 KB

File metadata and controls

417 lines (352 loc) · 6.84 KB

API Reference

This document provides a comprehensive reference for the GraphQL API operations available in the IBCOL GraphQL Micro API.

GraphQL Schema

The API is built around the following main types:

  • Application: Team applications with associated students, advisors, and projects
  • AccessToken: Authentication tokens
  • AdminEmail: Administrative access control
  • Custom scalar types: Date, JSON

Authentication

Most operations require authentication using an access token. The token should be included in the request headers:

{
  "email": "user@example.com",
  "token": "your-access-token"
}

Queries

getApplications

Retrieves applications associated with the authenticated user's email.

query GetApplications($accessToken: TokenInput!) {
  getApplications(accessToken: $accessToken) {
    id
    ref
    teamName
    studentRecords {
      firstName
      lastName
      email
    }
    projectRecords {
      name
      projectCategoryKey
    }
    meta {
      createdAt
      updatedAt
    }
  }
}

Variables:

{
  "accessToken": {
    "email": "user@example.com",
    "token": "your-access-token"
  }
}

getApplicationsAsAdmin

Retrieves all applications (admin access required).

query GetApplicationsAsAdmin {
  getApplicationsAsAdmin {
    id
    ref
    teamName
    studentRecords {
      firstName
      lastName
      email
    }
    projectRecords {
      name
      projectCategoryKey
    }
    meta {
      createdAt
      updatedAt
      approvedAt
      rejectedAt
    }
  }
}

Mutations

addApplication

Creates a new team application.

mutation AddApplication($application: ApplicationInput!) {
  addApplication(application: $application) {
    id
    ref
    teamName
  }
}

Variables:

{
  "application": {
    "teamName": "Blockchain Innovators",
    "studentRecords": [
      {
        "firstName": "John",
        "lastName": "Doe",
        "email": "john@example.com",
        "phoneNumber": "+1234567890",
        "educationRecords": [
          {
            "institutionName": "University of Blockchain",
            "state": "California",
            "city": "San Francisco",
            "countryCode": "US",
            "degree": "Bachelor",
            "programme": "Computer Science",
            "yearOfGraduation": "2023"
          }
        ]
      }
    ],
    "projectRecords": [
      {
        "name": "Decentralized Identity Solution",
        "projectCategoryKey": "IDENTITY",
        "description": "A blockchain-based identity verification system"
      }
    ]
  }
}

updateApplication

Updates an existing application.

mutation UpdateApplication($accessToken: TokenInput!, $application: ApplicationUpdateInput!) {
  updateApplication(accessToken: $accessToken, application: $application) {
    id
    ref
    teamName
  }
}

Variables:

{
  "accessToken": {
    "email": "user@example.com",
    "token": "your-access-token"
  },
  "application": {
    "ref": "ABC-1234567890",
    "teamName": "Updated Team Name",
    "studentRecords": [...],
    "projectRecords": [...]
  }
}

deleteApplicationById

Deletes an application by ID (admin access required).

mutation DeleteApplication($id: ID!) {
  deleteApplicationById(id: $id) {
    id
    ref
  }
}

Variables:

{
  "id": "application-id"
}

Input Types

TokenInput

input TokenInput {
  email: String!
  token: String!
}

ApplicationInput

input ApplicationInput {
  teamName: String!
  studentRecords: [StudentRecordInput!]!
  advisorRecords: [AdvisorRecordInput]
  projectRecords: [ProjectRecordInput!]!
}

ApplicationUpdateInput

input ApplicationUpdateInput {
  ref: String!
  teamName: String!
  studentRecords: [StudentRecordInput!]!
  advisorRecords: [AdvisorRecordInput]
  projectRecords: [ProjectRecordInput!]!
}

StudentRecordInput

input StudentRecordInput {
  firstName: String!
  lastName: String!
  phoneNumber: String
  email: String!
  educationRecords: [EducationRecordInput!]!
}

EducationRecordInput

input EducationRecordInput {
  institutionName: String!
  state: String!
  city: String!
  countryCode: String!
  degree: String!
  programme: String!
  yearOfGraduation: String!
  studentNumber: String
  studentCardFrontFileId: String
  studentCardBackFileId: String
  transcriptFileId: String
}

AdvisorRecordInput

input AdvisorRecordInput {
  firstName: String!
  lastName: String!
  phoneNumber: String
  email: String!
  associationRecords: [AssociationRecordInput!]!
}

AssociationRecordInput

input AssociationRecordInput {
  organisationName: String!
  title: String!
  sectorCode: String!
  state: String!
  city: String!
  countryCode: String!
  yearCommencement: String!
  yearCessation: String
}

ProjectRecordInput

input ProjectRecordInput {
  ref: String
  name: String!
  projectCategoryKey: String!
  description: String!
  whitepaperFileId: String
  presentationFileId: String
}

Response Types

Application

type Application {
  id: ID!
  ref: String!
  teamName: String!
  studentRecords: [StudentRecord!]!
  advisorRecords: [AdvisorRecord]
  projectRecords: [ProjectRecord!]!
  verificationKeys: [VerificationKey]!
  meta: ApplicationMeta
}

StudentRecord

type StudentRecord {
  firstName: String!
  lastName: String!
  phoneNumber: String
  email: String!
  educationRecords: [EducationRecord!]!
  emailVerified: Boolean
  phoneNumberVerified: Boolean
}

EducationRecord

type EducationRecord {
  institutionName: String!
  state: String!
  city: String!
  countryCode: String!
  degree: String!
  programme: String!
  yearOfGraduation: String!
  studentNumber: String
  studentCardFrontFileId: String
  studentCardBackFileId: String
  transcriptFileId: String
  isVerified: Boolean
}

AdvisorRecord

type AdvisorRecord {
  firstName: String!
  lastName: String!
  phoneNumber: String
  email: String!
  associationRecords: [AssociationRecord!]!
}

AssociationRecord

type AssociationRecord {
  organisationName: String!
  title: String!
  sectorCode: String!
  state: String!
  city: String!
  countryCode: String!
  yearCommencement: String!
  yearCessation: String
}

ProjectRecord

type ProjectRecord {
  ref: String!
  name: String!
  projectCategoryKey: String!
  description: String!
  whitepaperFileIds: [DropFile]
  presentationFileIds: [DropFile]
}

DropFile

type DropFile {
  receivedAt: Date
  fileId: String!
}

ApplicationMeta

type ApplicationMeta {
  createdAt: Date
  updatedAt: Date
  approvedAt: Date
  rejectedAt: Date
  deletedAt: Date
}

VerificationKey

type VerificationKey {
  publicKey: String!
  password: String!
}