GraphQL APIs
Document GraphQL APIs with visual editors, support for queries, mutations, subscriptions, custom scalars, directives, and interfaces. Create complete API documentation that helps developers understand and integrate with your GraphQL services.
The GraphQL API documentation tooling includes a visual editor that supports queries, mutations, subscriptions, custom scalars, directives, and interfaces. Document your GraphQL APIs with full authentication scheme support, argument validation, and example queries.
E-Commerce GraphQL API
Explore this complete working example that demonstrates GraphQL API documentation with 17 operations covering products, orders, customers, and real-time inventory updates.
A comprehensive GraphQL API for e-commerce operations including products, orders, customers, and real-time inventory updates. This API follows the Relay specification for pagination and implements standard GraphQL best practices.
Query Operations
Retrieve product and customer data from the API.
Retrieves a paginated list of products with optional filtering. Supports Relay-style cursor-based pagination.
Retrieves a single customer by their unique identifier. Requires authentication and appropriate permissions.
Retrieves a single order by its unique identifier. Users can only access their own orders unless they have administrative privileges.
Mutation Operations
Create and update data in the system.
Creates a new order for a customer. The order is initially created in PENDING status and must have at least one item. Stock is reserved upon order creation.
Creates a new customer account. The email address must be unique. A welcome email is sent upon successful creation.
Updates the status of an order. Valid transitions are: PENDING→CONFIRMED→SHIPPED→DELIVERED or PENDING→CANCELLED. Returns the updated order with status history.
Subscription Operations
Subscribe to real-time updates via WebSocket connections.
Subscribes to real-time inventory updates for a specific product or all products. Emits events when stock quantities change due to orders, restocking, or manual adjustments.
Subscribes to real-time order status updates for a specific order. Emits an event whenever the order status changes, including the new status, previous status, and timestamp.