> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dropkit.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Drop Type

> Complete reference for the Drop GraphQL type

## Drop Type

The `Drop` type represents a drop (NFT or token distribution) in the DropKit system.

## Type Definition

```graphql theme={null}
type Drop {
  # Core identifiers
  id: ID!
  title: String
  description: String
  shortcode: String # Unique claim URL shortcode
  # Drop configuration
  type: DropType! # TOKEN or NFT
  claimType: ClaimType! # REGULAR, STREAK, REFERRAL, etc.
  status: DropStatus! # DRAFT, ACTIVE, PAUSED, COMPLETED, DELETED
  # Amount configuration
  maxAmount: String! # Maximum claimable amount
  claimedAmount: String! # Currently claimed amount (live data)
  tokenAmount: String # Amount per claim (e.g., "100" or "0" for random)
  remainingBalance: String # Computed: maxAmount - claimedAmount
  tokenBalance: String # Actual token balance in contract
  # Pricing and supply
  price: Float # Price per item (for paid drops)
  supply: Int # Total supply
  estimatedValueUsd: Float # Estimated USD value
  # Status and activity
  isActive: Boolean! # Live blockchain status
  claimDeadline: DateTime # Optional deadline
  # Statistics (computed)
  claimCount: Int # Number of claims made
  claimRate: Float # Percentage claimed
  # Media
  imageUrl: String # Drop image URL
  # Blockchain deployment fields
  dropObjectId: String # On-chain drop object ID
  adminCapId: String # Admin capability ID
  deploymentTxHash: String # Deployment transaction hash
  contractPackageId: String # Smart contract package ID
  backendSigningPubKey: String # Backend signing public key
  coinType: String # Token type identifier
  # Legacy fields
  tokenSymbol: String # Token symbol (use token.symbol instead)
  tokenAddress: String # Token address (use token.address instead)
  # Timestamps
  createdAt: DateTime!
  updatedAt: DateTime!

  # Relationships
  creator: User! # Drop creator
  token: Token # Associated token
  claims: [Claim!]! # All claims made on this drop
  gatingConfig: GatingConfig # Access control configuration
}
```

## Field Details

### Core Identifiers

#### `id: ID!`

Unique identifier for the drop.

* **Type**: Non-null ID
* **Example**: `"drop_abc123"`

#### `title: String`

Display name for the drop.

* **Type**: Optional string
* **Example**: `"Community Token Drop"`

#### `description: String`

Optional description of the drop.

* **Type**: Optional string
* **Example**: `"A drop for early supporters of our community"`

#### `shortcode: String`

Unique shortcode used in claim URLs.

* **Type**: Optional string (auto-generated if not provided)
* **Example**: `"community-drop"`
* **URL**: `https://app.dropkit.co/claim/community-drop`

### Drop Configuration

#### `type: DropType!`

The type of drop being created.

* **Type**: Non-null enum
* **Values**: `TOKEN` | `NFT`
* **Example**: `TOKEN`

#### `claimType: ClaimType!`

The claiming mechanism for this drop.

* **Type**: Non-null enum
* **Values**: `REGULAR` | `STREAK` | `REFERRAL` | `OG` | `ELITE` | `NFT_DROP` | `TOKEN_DROP`
* **Example**: `REGULAR`

#### `status: DropStatus!`

Current status of the drop.

* **Type**: Non-null enum
* **Values**: `DRAFT` | `ACTIVE` | `PAUSED` | `COMPLETED` | `DELETED`
* **Example**: `ACTIVE`

### Amount Configuration

#### `maxAmount: String!`

Maximum total amount that can be claimed from this drop.

* **Type**: Non-null string (to handle large numbers)
* **Format**: Base units (e.g., for 9 decimal token, "1000000000" = 1 token)
* **Example**: `"100000000000000"` (100,000 tokens with 9 decimals)

#### `claimedAmount: String!`

Currently claimed amount (live blockchain data).

* **Type**: Non-null string
* **Source**: Real-time blockchain queries
* **Example**: `"25000000000000"` (25,000 tokens claimed)

#### `tokenAmount: String`

Amount per individual claim.

* **Type**: Optional string
* **Special Values**: `"0"` indicates random amounts
* **Example**: `"100000000000"` (100 tokens per claim)

#### `remainingBalance: String`

Computed field showing remaining claimable amount.

* **Type**: String (computed field)
* **Calculation**: `maxAmount - claimedAmount`
* **Example**: `"75000000000000"`

#### `tokenBalance: String`

Actual token balance remaining in the drop contract.

* **Type**: String (live blockchain data)
* **Source**: Direct contract balance query
* **Example**: `"75000000000000"`

### Pricing and Supply

#### `price: Float`

Price per item for paid drops.

* **Type**: Optional float
* **Unit**: Usually in USD or crypto equivalent
* **Example**: `5.0`

#### `supply: Int`

Total supply of items.

* **Type**: Optional integer
* **Use Case**: Primarily for NFT drops
* **Example**: `1000`

#### `estimatedValueUsd: Float`

Estimated USD value of the drop.

* **Type**: Optional float
* **Example**: `10.0`

### Status and Activity

#### `isActive: Boolean!`

Live blockchain status of the drop.

* **Type**: Non-null boolean
* **Source**: Real-time blockchain query
* **Example**: `true`

#### `claimDeadline: DateTime`

Optional deadline for claims.

* **Type**: Optional DateTime
* **Format**: ISO 8601
* **Example**: `"2024-12-31T23:59:59Z"`

### Statistics (Computed)

#### `claimCount: Int`

Number of individual claims made.

* **Type**: Integer (computed)
* **Source**: Database count of claims
* **Example**: `250`

#### `claimRate: Float`

Percentage of the drop that has been claimed.

* **Type**: Float (computed)
* **Calculation**: `(claimedAmount / maxAmount) * 100`
* **Example**: `25.0` (25% claimed)

### Blockchain Deployment

#### `dropObjectId: String`

On-chain drop object identifier.

* **Type**: Optional string
* **Format**: Sui object ID
* **Example**: `"0x123abc..."`

#### `adminCapId: String`

Admin capability object ID.

* **Type**: Optional string
* **Example**: `"0x456def..."`

#### `deploymentTxHash: String`

Transaction hash of the drop deployment.

* **Type**: Optional string
* **Example**: `"0x789ghi..."`

#### `contractPackageId: String`

Smart contract package ID.

* **Type**: Optional string
* **Example**: `"0xabcjkl..."`

#### `coinType: String`

Token type identifier for blockchain.

* **Type**: Optional string
* **Format**: `package::module::Type`
* **Example**: `"0xabc123::token::COMM"`

## Relationships

### `creator: User!`

The user who created this drop.

* **Type**: Non-null User
* **Fields**: Can query all user fields
* **Example**:
  ```graphql theme={null}
  creator {
    id
    username
    displayName
    avatar
  }
  ```

### `token: Token`

The token associated with this drop.

* **Type**: Optional Token
* **Resolved**: By `tokenAddress` field
* **Example**:
  ```graphql theme={null}
  token {
    id
    name
    symbol
    decimals
    totalSupply
  }
  ```

### `claims: [Claim!]!`

All claims made on this drop.

* **Type**: Non-null array of Claims
* **Supports**: Pagination via arguments
* **Example**:
  ```graphql theme={null}
  claims(limit: 10) {
    id
    amount
    claimedAt
    user {
      username
    }
  }
  ```

### `gatingConfig: GatingConfig`

Access control configuration for this drop.

* **Type**: Optional GatingConfig
* **Purpose**: Defines eligibility requirements
* **Example**:
  ```graphql theme={null}
  gatingConfig {
    isActive
    rules {
      key
      operator
      value
      description
    }
  }
  ```

## Enums

### DropType

```graphql theme={null}
enum DropType {
  NFT # Non-fungible token drop
  TOKEN # Fungible token drop
}
```

### DropStatus

```graphql theme={null}
enum DropStatus {
  DRAFT # Drop is being configured
  ACTIVE # Drop is live and claimable
  PAUSED # Drop is temporarily disabled
  COMPLETED # Drop has been fully claimed or ended
  DELETED # Drop has been deleted
}
```

### ClaimType

```graphql theme={null}
enum ClaimType {
  REGULAR # Standard claim mechanism
  STREAK # Streak-based claiming
  REFERRAL # Referral-based claiming
  OG # Original supporter claims
  ELITE # Elite user claims
  NFT_DROP # NFT-specific drop type
  TOKEN_DROP # Token-specific drop type
}
```

## Common Queries

### Basic Drop Information

```graphql theme={null}
query GetDropBasics($id: ID!) {
  drop(id: $id) {
    id
    title
    description
    type
    status
    claimType
    shortcode
    imageUrl
    createdAt
  }
}
```

### Drop Statistics

```graphql theme={null}
query GetDropStats($id: ID!) {
  drop(id: $id) {
    id
    title
    maxAmount
    claimedAmount
    remainingBalance
    claimCount
    claimRate
    isActive
    tokenBalance
  }
}
```

### Drop with Relations

```graphql theme={null}
query GetDropWithRelations($id: ID!) {
  drop(id: $id) {
    id
    title
    description
    type
    status
    maxAmount
    claimedAmount
    claimRate
    creator {
      username
      displayName
    }
    token {
      name
      symbol
      decimals
    }
    claims(limit: 5) {
      id
      amount
      claimedAt
      user {
        username
      }
    }
    gatingConfig {
      isActive
      rules {
        description
      }
    }
  }
}
```

### Live Blockchain Data

```graphql theme={null}
query GetLiveDropData($id: ID!) {
  drop(id: $id) {
    id
    title
    # Live blockchain fields
    claimedAmount
    maxAmount
    remainingBalance
    tokenBalance
    isActive
    # Computed fields
    claimRate
  }
}
```

## Best Practices

### 1. Request Only Needed Fields

```graphql theme={null}
# Good: Minimal fields for list view
query DropsList {
  drops {
    id
    title
    status
    claimRate
    type
  }
}

# Avoid: All fields when not needed
query DropsListBad {
  drops {
    id
    title
    description
    # ... all other fields
  }
}
```

### 2. Use Fragments for Reusability

```graphql theme={null}
fragment DropBasics on Drop {
  id
  title
  description
  type
  status
  claimType
  shortcode
  imageUrl
}

fragment DropStats on Drop {
  maxAmount
  claimedAmount
  claimCount
  claimRate
  remainingBalance
  isActive
}

query GetDrop($id: ID!) {
  drop(id: $id) {
    ...DropBasics
    ...DropStats
    creator {
      username
      displayName
    }
  }
}
```

### 3. Handle Null Values

```graphql theme={null}
query SafeDropQuery($id: ID!) {
  drop(id: $id) {
    id
    title
    description
    # Handle optional fields
    price
    supply
    claimDeadline
    # Handle relationships that might be null
    token {
      name
      symbol
    }
    gatingConfig {
      isActive
    }
  }
}
```

## Real-time Features

The Drop type includes several fields that provide real-time blockchain data:

* **`claimedAmount`**: Live amount claimed from blockchain
* **`isActive`**: Live drop status from blockchain
* **`remainingBalance`**: Computed from live data
* **`tokenBalance`**: Live token balance in contract
* **`claimRate`**: Computed from live claimed amount

These fields are resolved using cached blockchain queries to provide accurate, up-to-date information while maintaining performance.
