Schema introspection or SDL
Point a GraphQL request at an endpoint and fetch the schema with one click, or turn on automatic introspection when the URL is set. If the server has introspection disabled, load the schema from elsewhere: a URL serving SDL or an introspection JSON, or SDL pasted directly. The schema is kept with the request, so teammates who open it later get the same explorer without re-fetching.
Explorer and autocomplete
The schema explorer lists queries, mutations and subscriptions with their arguments and return types, and can be filtered by name. The query editor completes fields, arguments and types from the loaded schema, which makes unfamiliar APIs much faster to learn than reading raw SDL. Variables go in their own JSON editor next to the query.
query Country($code: ID!) {
country(code: $code) {
name
capital
currency
languages { code name }
}
}{ "code": "IN" }Subscriptions over WebSocket
For subscription operations, set a subscription URL (wss://…) and choose the sub-protocol your server speaks: graphql-transport-ws (the protocol of the graphql-ws library) or the legacy graphql-ws protocol from subscriptions-transport-ws. Connection params (JSON) are sent in the init message, which is where many servers expect an auth token. Incoming events appear in a timestamped message log.
Headers, auth and variables
GraphQL requests share everything HTTP requests have: headers, auth helpers including Bearer and OAuth 2.0, and {{variables}} from your environments. Use a different environment to point the same query at staging or production.
Tests on GraphQL responses
Because a GraphQL query is an HTTP request, the same pre-request and test scripts work. A typical check that a query succeeded without GraphQL errors:
swc.test("no GraphQL errors", () => {
const body = swc.response.json();
swc.expect(body.errors, JSON.stringify(body.errors)).to.be.undefined;
swc.expect(body.data.country.name).to.eql("India");
});Save GraphQL requests in collections and run them with the collection runner or on a monitor.
Import a schema as a collection
Importing a GraphQL schema (SDL or an introspection result) creates a collection with one request per Query, Mutation and Subscription field, grouped into folders, with arguments turned into variables. It is a quick way to get a starting point for every operation.
How it works
- Open the app and create a new request, then change its type to GraphQL.
- Enter the endpoint URL and fetch the schema.
- Write a query with autocomplete, add variables and send. Sending needs a free account, because the web app sends through the Swastik Codes server, which only reaches public addresses.
Frequently asked questions
What if introspection is disabled on my server?
Load the schema from a URL that serves SDL or an introspection JSON, or paste the SDL into the request. Autocomplete and the explorer work from whichever schema you provide.
Which subscription protocols are supported?
graphql-transport-ws (used by the graphql-ws library) and the legacy graphql-ws protocol of subscriptions-transport-ws.
Can I test a GraphQL API running on localhost?
Queries and mutations, yes: run swc bridge on your computer and switch on Local bridge in the status bar, and they are sent from your machine. Fetching the schema still goes through the cloud, which refuses private and loopback addresses, so paste the schema (SDL or an introspection result) into the Schema settings or use the desktop app for Windows and Linux, which does everything locally.
Do Postman GraphQL requests import correctly?
Yes. Postman collections with GraphQL body mode keep their query and variables when imported.