Overview of bruno-graphql-docs
mainbruno-graphql-docs is a standalone GraphQL documentation explorer module. It is a fork of GraphiQL, designed to provide an interface for exploring GraphQL schemas and documentation.repository·main·Indexed 12 days ago
https://github.com/usebruno/brunoAn API client and CLI for running and testing API collections. The Bruno CLI enables automation of API testing within CI/CD workflows and provides official Docker images (Alpine and Debian) for container-native environments.
bruno-graphql-docs is a standalone GraphQL documentation explorer module. It is a fork of GraphiQL, designed to provide an interface for exploring GraphQL schemas and documentation.bruno-common is a shared utility library used across the Bruno ecosystem, including the Bruno App, Electron-based components, and the Bruno CLI. It provides common logic and helper functions used by these various packages to ensure consistency across the platform.Bruno is an open-source IDE designed for testing and exploring APIs. Unlike many other API clients, Bruno is fully offline and autonomous, prioritizing data privacy by avoiding cloud synchronization.
Key features include:
.bru markup language to save API request information in a human-readable text format.Bruno is an open-source API client designed for exploring and testing APIs. Unlike many other API clients, Bruno is built around a local-first philosophy: it stores your collections directly in folders on your filesystem rather than in a proprietary cloud.
Key characteristics include:
Bru language within your local filesystem.bruno-lang package provides utility functions designed for parsing, manipulating, and working with .bru files, which is the core file format used by Bruno for storing API collections and requests.bruno-tests collection is an API collection specifically designed to run sanity tests against the Bruno CLI. It can be used to verify that the CLI is functioning correctly by executing the requests contained within the collection.The @usebruno/filestore package provides a generic interface for handling Bruno's file formats. It allows you to convert raw file content (like .bru files) into JavaScript objects and vice versa. This is useful for building tools that need to programmatically manipulate Bruno collections, requests, folders, or environments.
Currently, the package primarily supports Bruno's custom .bru format, but it is designed to support other formats like YAML in the future via an options object.
const {
parseRequest,
stringifyRequest,
parseCollection,
stringifyCollection,
parseEnvironment,
stringifyEnvironment,
parseDotEnv
} = require('@usebruno/filestore');
// Parse a .bru request file
const requestData = parseRequest(bruContent);
// Stringify request data back to .bru format
const bruContent = stringifyRequest(requestData);bruno-js package provides the necessary runtimes for executing scripts, tests, variables, and assertions within the Bruno ecosystem. It enables the logic required to run JavaScript-based automation and validation during request execution.To maintain clear test intent, follow the separation of concerns between Actions and Specs:
tests/utils/page/*)locator.waitFor({ state }) or page.waitForLoadState().expect(...) assertions. They should only ensure the UI is ready for the next step..spec.ts files)expect(...) belongs. The spec verifies the outcome of the actions performed.// Action: Synchronizes, does NOT assert
export const openRenameModal = async (page: Page, requestName: string) => {
await test.step(`Open rename modal for "${requestName}"`, async () => {
const { sidebar, actions, dropdown } = buildCommonLocators(page);
await sidebar.request(requestName).hover();
await actions.collectionItemActions(requestName).click();
await dropdown.item('Rename').click();
// Synchronization: wait for the UI to be ready
await page.locator('.bruno-modal').filter({ hasText: 'Rename Request' }).waitFor({ state: 'visible' });
});
};
// Spec: Owns the assertion
test('renames a request', async ({ page }) => {
const { modal } = buildCommonLocators(page);
// ... arrange ...
await openRenameModal(page, 'Test Request');
// Assertion: verifies the outcome
await expect(modal.title('Rename Request')).toBeVisible();
});When building or using components within the Bruno UI system, follow these architectural conventions:
value prop combined with an onChange(value, event) callback to manage state.ref and pass through additional props (e.g., ...rest, data-*) to ensure compatibility.dataTestId prop for testing purposes.RadioGroup or SegmentedControl) require an accessible name via label, ariaLabel, or ariaLabelledBy. Failure to provide these will trigger warnings in development.props.theme (using styled-components).