> ## 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.

# Schema Explorer

> Explore and test the DropKit GraphQL API with our interactive schema explorer

## Interactive GraphQL Explorer

Explore the complete DropKit GraphQL schema, run queries, and test mutations directly in your browser.

<iframe src="https://api.dropkit.co/graphql?explorerIsOpen=true" width="100%" height="600px" style={{ border: "1px solid #e1e5e9", borderRadius: "8px" }} title="DropKit GraphQL Explorer" />

## Quick Start

### 1. Authentication

First, authenticate your requests by adding your API token to the headers:

```json theme={null}
{
  "Authorization": "Bearer YOUR_API_TOKEN"
}
```

### 2. Explore the Schema

Use the **Docs** panel (📖) to browse all available types, queries, and mutations:

* **Query** - Read operations for drops, tokens, users, and more
* **Mutation** - Write operations for creating, updating, and deleting resources
* **Subscription** - Real-time updates for live data

### 3. Try Sample Queries

#### Get Drops

```graphql theme={null}
query GetDrops {
  drops {
    id
    name
    type
    status
    price
    priceUSD
    totalSupply
    claimedAmount
    creator {
      username
      displayName
    }
  }
}
```

#### Get User Profile

```graphql theme={null}
query GetUser($id: ID!) {
  user(id: $id) {
    id
    username
    displayName
    email
    createdAt
    drops {
      id
      name
      status
    }
  }
}
```

#### Create a Token

```graphql theme={null}
mutation CreateToken($input: CreateTokenInput!) {
  createToken(input: $input) {
    id
    name
    symbol
    status
    totalSupply
    createdAt
  }
}
```

## Explorer Features

### 🔍 **Schema Introspection**

* Browse all available types, fields, and descriptions
* View field arguments and return types
* Explore enum values and input types

### 🧪 **Query Testing**

* Write and execute queries in real-time
* Auto-complete for types and fields
* Syntax highlighting and error detection

### 📚 **Interactive Documentation**

* Click on any type or field to see documentation
* Navigate through type relationships
* View examples and usage patterns

### 🔧 **Request Configuration**

* Set custom headers for authentication
* Configure variables for dynamic queries
* Save and share query configurations

## Schema Overview

### Root Types

```graphql theme={null}
type Query {
  # Drops
  drops: [Drop!]!
  drop(id: ID!): Drop

  # Tokens
  tokens: [Token!]!
  token(id: ID!): Token

  # Users
  users: [User!]!
  user(id: ID!): User

  # Claims
  claims: [Claim!]!
  claim(id: ID!): Claim

  # Payments
  paymentIntents: [PaymentIntent!]!
  paymentIntent(id: ID!): PaymentIntent

  # Gating
  checkEligibility(input: CheckEligibilityInput!): EligibilityResult!
  gatingTemplates: [GatingTemplate!]!

  # Events
  events: [Event!]!
  event(id: ID!): Event

  # Webhooks
  webhooks: [Webhook!]!
  webhook(id: ID!): Webhook
}

type Mutation {
  # Drop Management
  createDrop(input: CreateDropInput!): Drop!
  updateDrop(input: UpdateDropInput!): Drop!
  deleteDrop(input: DeleteDropInput!): Boolean!

  # Token Creation
  createToken(input: CreateTokenInput!): Token!
  confirmTokenDeployment(input: ConfirmTokenDeploymentInput!): Token!

  # Claims
  createClaim(input: CreateClaimInput!): Claim!
  confirmClaim(input: ConfirmClaimInput!): Claim!

  # Payments
  createPaymentIntent(input: CreatePaymentIntentInput!): PaymentIntent!
  confirmPaymentIntent(input: ConfirmPaymentIntentInput!): PaymentIntent!
  processRefund(input: ProcessRefundInput!): Refund!

  # Webhooks
  createWebhook(input: CreateWebhookInput!): Webhook!
  updateWebhook(input: UpdateWebhookInput!): Webhook!
  deleteWebhook(input: DeleteWebhookInput!): Boolean!
  testWebhook(input: TestWebhookInput!): WebhookTestResult!

  # File Management
  uploadFile(input: UploadFileInput!): FileUpload!
  deleteFile(input: DeleteFileInput!): Boolean!
}

type Subscription {
  # Real-time drop updates
  dropUpdates(dropId: ID!): DropUpdate!

  # Live claim notifications
  claimNotifications(userId: ID!): ClaimNotification!

  # Payment status updates
  paymentUpdates(paymentIntentId: ID!): PaymentUpdate!

  # Event streams
  eventStream(types: [String!]): Event!
}
```

### Core Types

#### Drop

```graphql theme={null}
type Drop {
  id: ID!
  name: String!
  description: String
  type: DropType!
  status: DropStatus!

  # Pricing
  price: Float!
  priceUSD: Float!
  currency: String!

  # Supply
  totalSupply: BigInt!
  claimedAmount: BigInt!
  remainingBalance: BigInt!

  # Metadata
  imageUrl: String
  metadata: JSON

  # Relationships
  creator: User!
  token: Token
  claims: [Claim!]!

  # Computed fields
  isActive: Boolean!
  isSoldOut: Boolean!
  percentClaimed: Float!

  # Timestamps
  createdAt: DateTime!
  updatedAt: DateTime!
}
```

#### Token

```graphql theme={null}
type Token {
  id: ID!
  name: String!
  symbol: String!
  decimals: Int!
  totalSupply: BigInt!
  description: String
  imageUrl: String

  # Blockchain data
  address: String
  packageId: String
  coinType: String

  # Status
  status: TokenStatus!
  isExternal: Boolean!

  # Distribution
  communityDropsReserve: BigInt!
  publicSaleReserve: BigInt!
  creatorReserve: BigInt!

  # Relationships
  creator: User!
  drops: [Drop!]!

  # Timestamps
  createdAt: DateTime!
  updatedAt: DateTime!
}
```

#### User

```graphql theme={null}
type User {
  id: ID!
  username: String!
  displayName: String
  email: String
  bio: String
  avatarUrl: String

  # Authentication
  privyId: String!
  walletAddress: String

  # Relationships
  drops: [Drop!]!
  tokens: [Token!]!
  claims: [Claim!]!

  # Computed fields
  totalDrops: Int!
  totalClaims: Int!

  # Timestamps
  createdAt: DateTime!
  updatedAt: DateTime!
}
```

## Advanced Features

### Variables and Fragments

Use variables to make your queries dynamic:

```graphql theme={null}
query GetDropWithClaims($dropId: ID!, $limit: Int = 10) {
  drop(id: $dropId) {
    ...DropDetails
    claims(limit: $limit) {
      ...ClaimDetails
    }
  }
}

fragment DropDetails on Drop {
  id
  name
  type
  status
  price
  priceUSD
  totalSupply
  claimedAmount
  creator {
    username
    displayName
  }
}

fragment ClaimDetails on Claim {
  id
  amount
  status
  createdAt
  user {
    username
  }
}
```

### Subscriptions

Test real-time subscriptions:

```graphql theme={null}
subscription LiveDropUpdates($dropId: ID!) {
  dropUpdates(dropId: $dropId) {
    type
    drop {
      id
      claimedAmount
      remainingBalance
      isActive
    }
    timestamp
  }
}
```

### Introspection

Explore the schema programmatically:

```graphql theme={null}
query IntrospectionQuery {
  __schema {
    types {
      name
      description
      fields {
        name
        type {
          name
        }
      }
    }
  }
}
```

## Tips for Using the Explorer

### 1. **Use Auto-Complete**

* Press `Ctrl+Space` to trigger auto-completion
* Use `Ctrl+Enter` to execute queries
* Press `Ctrl+/` to comment/uncomment lines

### 2. **Navigate with Keyboard**

* `F1` - Open command palette
* `Ctrl+D` - Select next occurrence
* `Ctrl+Shift+L` - Select all occurrences

### 3. **Save Your Work**

* Use the **History** tab to revisit previous queries
* Save frequently used queries as **Favorites**
* Export queries to share with your team

### 4. **Test Error Handling**

* Try invalid field names to see error messages
* Test required field validation
* Experiment with different input types

## API Endpoint

The GraphQL endpoint is available at:

```
https://api.dropkit.co/graphql
```

For development and testing:

```
https://api-dev.dropkit.co/graphql
```

## Authentication

Include your API token in the Authorization header:

```bash theme={null}
curl -X POST \
  https://api.dropkit.co/graphql \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "query { drops { id name } }"}'
```

## Need Help?

* **Documentation**: Check our [Query](/api-reference/queries/drops) and [Mutation](/api-reference/mutations/drop-management) guides
* **Support**: Contact us at [support@dropkit.co](mailto:support@dropkit.co)
* **Community**: Join our [Discord](https://discord.gg/dropkit) for community support

<Card title="Pro Tip" icon="lightbulb">
  Use the **prettify** button (⌘+Shift+P) to format your queries and make them
  more readable.
</Card>
