Skip to content

GraphQL Playground

Interactive GraphQL API Explorer

Use the playground below to explore the Essence Platform GraphQL API. You can write queries, execute them, and see real results.

Authentication Required

To use the playground, you need to provide authentication. Click the "HTTP HEADERS" tab at the bottom and add:

```json { "Authorization": "Bearer YOUR_JWT_TOKEN" } ```

Or use an API key:

```json { "X-Api-Key": "YOUR_API_KEY" } ```

Get your API key →

Example Queries

Try these example queries in the playground:

List All Vaults

graphql
query GetVaults {
  vaults {
    id
    name
    description
    documentCount
    totalSize
    createdAt
  }
}

Get Specific Vault with Documents

graphql
query GetVaultDetails($vaultId: ID!) {
  getVault(id: $vaultId) {
    id
    name
    documents {
      id
      fileName
      sizeBytes
      mimeType
      createdAt
    }
  }
}

Variables:

json
{
  "vaultId": "your-vault-id-here"
}

Search Documents

graphql
query SearchDocuments($searchTerm: String!) {
  searchDocuments(searchTerm: $searchTerm) {
    id
    fileName
    description
    vault {
      id
      name
    }
  }
}

Variables:

json
{
  "searchTerm": "invoice"
}

Get Current User

graphql
query GetCurrentUser {
  me {
    id
    email
    firstName
    lastName
    instance {
      id
      name
      type
    }
  }
}

Get Vault Statistics

graphql
query GetVaultStats {
  getVaultStatistics {
    totalVaults
    totalDocuments
    totalStorageBytes
    activeVaults
    averageDocumentsPerVault
  }
}

Example Mutations

Create Vault

graphql
mutation CreateVault($input: CreateVaultInput!) {
  createVault(input: $input) {
    success
    message
    vault {
      id
      name
      createdAt
    }
    errors {
      message
      code
    }
  }
}

Variables:

json
{
  "input": {
    "name": "My New Vault",
    "description": "Created via GraphQL Playground",
    "category": "personal"
  }
}

Upload Document

graphql
mutation CreateDocument($input: CreateDocumentInput!) {
  createDocument(input: $input) {
    success
    message
    document {
      id
      fileName
      sizeBytes
    }
    errors {
      message
      code
    }
  }
}

Variables:

json
{
  "input": {
    "vaultId": "your-vault-id",
    "fileName": "document.pdf",
    "encryptedData": "base64-encrypted-data-here",
    "sizeBytes": 1024,
    "mimeType": "application/pdf",
    "encryptionMetadata": {
      "algorithm": "AES-256-GCM",
      "keyDerivation": "PBKDF2",
      "iterations": 100000,
      "iv": "base64-iv-here",
      "authTag": "base64-auth-tag-here"
    }
  }
}

Share Document

graphql
mutation ShareDocument($input: ShareDocumentInput!) {
  shareDocument(input: $input) {
    success
    message
    share {
      id
      shareToken
      expiresAt
      permissions
    }
  }
}

Variables:

json
{
  "input": {
    "documentId": "your-document-id",
    "permissions": ["read"],
    "expiresAt": "2025-12-31T23:59:59Z",
    "maxAccessCount": 5
  }
}

Example Subscriptions

Subscribe to Vault Updates

graphql
subscription OnVaultUpdated($userId: ID!) {
  onVaultUpdated(userId: $userId) {
    vault {
      id
      name
      updatedAt
    }
    changeType
    timestamp
  }
}

Variables:

json
{
  "userId": "your-user-id"
}

Subscribe to Document Changes

graphql
subscription OnDocumentUpdated($vaultId: ID!) {
  onDocumentUpdated(vaultId: $vaultId) {
    document {
      id
      fileName
      updatedAt
    }
    changeType
  }
}

Tips for Using the Playground

1. Auto-Complete

Press Ctrl+Space (or Cmd+Space on Mac) to trigger auto-complete. The playground will suggest:

  • Available fields
  • Query arguments
  • Enum values

2. Schema Documentation

Click the "DOCS" button on the right side to explore the complete GraphQL schema. You can:

  • Browse all types
  • View field descriptions
  • See required arguments
  • Explore relationships

3. Query Variables

Use the "QUERY VARIABLES" panel at the bottom to pass dynamic values:

graphql
query GetVault($id: ID!) {
  getVault(id: $id) {
    name
  }
}
json
{
  "id": "vault-123"
}

4. Request Headers

Use the "HTTP HEADERS" panel to set authentication and other headers:

json
{
  "Authorization": "Bearer your-token",
  "X-Request-ID": "unique-request-id"
}

5. Prettify Queries

Press Shift+Ctrl+P (or Shift+Cmd+P on Mac) to auto-format your GraphQL query.

6. History

Click the "HISTORY" button to view and reuse previous queries.

7. Query Complexity

The playground shows query complexity in the bottom right. Keep it under 1000 to avoid rate limiting.

Troubleshooting

Authentication Errors

If you see "UNAUTHENTICATED" errors:

  1. Check that your token is valid and not expired
  2. Ensure the header format is correct: "Bearer YOUR_TOKEN"
  3. Get a new API key from settings

Rate Limiting

If you see "RATE_LIMIT_EXCEEDED" errors:

  • Free tier: 1,000 requests/hour, 10/minute burst
  • Wait a few minutes and try again
  • Consider upgrading your plan

CORS Errors

The playground should work without CORS issues. If you encounter problems:

  1. Use the playground at api.essence.digital/graphql
  2. Check that you're using HTTPS, not HTTP

Network Errors

If queries fail to execute:

  1. Check your internet connection
  2. Verify the API is online: status.essence.digital
  3. Try the query in your application code

Alternative Tools

Don't like the playground? Try these alternatives:

GraphiQL

Another popular GraphQL IDE:

bash
npm install -g graphiql
graphiql --endpoint https://api.essence.digital/graphql

Insomnia

Desktop API client with GraphQL support: Download Insomnia →

Postman

Configure a GraphQL request in Postman:

  1. Set method to POST
  2. URL: https://api.essence.digital/graphql
  3. Body: Select "GraphQL" tab
  4. Add your query

Next Steps


Questions? Join our Discord community for help.

Built with ❤️ for developers