Using the Ansarada GraphQL Playground
The Ansarada GraphQL Playground is an interactive interface that allows you to explore, build, and test GraphQL queries and mutations with ease.
Launch it here: https://ansarada.dev/playground
Key Features
- Explorer Sidebar: Visually browse the API schema and build queries by selecting fields with just a click.
- Query Editor: Write and modify GraphQL queries with syntax highlighting, auto-completion, and real-time validation.
- Live Results Panel: View responses instantly as you execute queries or mutations.
- Authorization Management: Switch between different authentication contexts (see below).
- Schema Documentation Panel: Explore types, fields, arguments, and descriptions inline as you build queries.
Example
Here’s an example of a simple query to fetch details about the currently authenticated user:
query MeQuery {
me {
id
email
firstName
lastName
}
}
Authorization Types
The Playground supports three authentication modes:
1. Inherit Auth from Parent
- This is Default mode.
- Uses the access token from your current session (e.g., if you’re already logged into the Playground).
- Ideal for testing normal authenticated API operations.
2. DataRoom Scope
- Uses a DataRoom-scoped access token that includes
dataroom_node_id
anddataroom_user_node_id
. - Required for operations specific to a Data Room, such as uploading/downloading documents or browsing the document index.
3. Anonymous
- Sends requests without any access token.
- Useful for exploring publicly accessible operations.
You can switch between these modes using the Authorization tab in the bottom panel of the Playground.
Tips
- The Explorer tab lets you visually build queries.
- Variables and Headers tabs allow testing with dynamic inputs and custom headers.
- The Authorization tab lets you switch between the three auth modes quickly.
- Hover over fields or types in the schema to see descriptions and type info.