Overview
The Code Export feature converts your current GraphQL query into a ready-to-use code snippet in your language of choice. The generated code includes the full HTTP request setup — endpoint URL, authentication headers, query body, and variables — so you can copy it directly into your project.Supported Languages
How to Export
1
Write your query
Enter or load a query into the editor. Make sure it executes successfully before exporting.
2
Click Export Code
Click the Export Code button in the toolbar. A modal opens with the language selector and generated snippet.
3
Select a language
Choose your target language from the dropdown. The snippet updates immediately.
4
Copy the snippet
Click the Copy button to copy the generated code to your clipboard.
Example Snippets
The following examples export a simple DEXTrades query — fetching the 10 latest Solana DEX trades:- cURL
- Python
- JavaScript
- Go
- Rust
What’s Included in Exported Code
Every generated snippet includes:Remember to replace
your_api_key with your actual API key before running the exported code. The IDE does not embed your real key in exported snippets for security.Tips
- Test before exporting — Run the query in the IDE first to confirm it works. Exported code copies the query as-is.
- Parameterize with variables — Use GraphQL variables instead of hardcoded values. The exported code includes the
variablesJSON alongside the query. - Check dependencies — Python snippets use
requests, Rust usesreqwest, Go uses the standard library. Make sure the required packages are installed in your project.

