Development
Cliente GraphQL no navegador: escreva queries e variáveis, envie para qualquer endpoint GraphQL e inspecione resultados JSON formatados ou arrays de erros — ideal para iterar sobre esquemas durante o desenvolvimento
Chame esta ferramenta a partir do seu código em três idiomas.
curl -X POST 'https://api.elysiatools.com/pt/api/tools/graphql-playground' \
-H 'Content-Type: application/json' \
-d '{"endpoint":"https://api.example.com/graphql","query":"# Welcome to the GraphQL Playground.\n# Replace the endpoint below, then click \"Send Query\".\n#\n# Example against the public Countries API:\n# https://countries.trevorblades.com/\n\nquery {\n continents {\n code\n name\n }\n}","variables":"{}","headers":"Authorization: Bearer token\nx-api-key: xxx"}'Envie uma requisição POST com suas entradas em JSON. Parâmetros do tipo arquivo exigem upload prévio.
POST https://api.elysiatools.com/pt/api/tools/graphql-playground| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| endpoint | text | Não | — |
| query | textarea | Não | — |
| variables | textarea | Não | — |
| headers | textarea | Não | — |
Resultado interativo
{
"result": "Initial display content",
"interactive": true,
"components": [
{
"type": "timer",
"id": "timer1",
"config": {
"label": "Countdown",
"duration": 60
}
}
],
"state": {
"key": "value"
},
"actions": [
{
"type": "start",
"id": "start-btn",
"label": "Start"
}
],
"styles": "/* Custom CSS */",
"scripts": "/* Client-side scripts */",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Adicione esta ferramenta ao seu servidor Model Context Protocol para que agentes de IA possam listá-la e chamá-la.
Adicione este bloco à configuração do seu cliente MCP:
{
"mcpServers": {
"elysiatools-graphql-playground": {
"name": "graphql-playground",
"description": "Cliente GraphQL no navegador: escreva queries e variáveis, envie para qualquer endpoint GraphQL e inspecione resultados JSON formatados ou arrays de erros — ideal para iterar sobre esquemas durante o desenvolvimento",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=graphql-playground",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Após conectar ao endpoint SSE, liste as ferramentas expostas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoque a ferramenta pelo seu id; os argumentos são construídos a partir de seus parâmetros:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "graphql-playground",
"arguments": {
"endpoint": "https://api.example.com/graphql",
"query": "# Welcome to the GraphQL Playground.\n# Replace the endpoint below, then click \"Send Query\".\n#\n# Example against the public Countries API:\n# https://countries.trevorblades.com/\n\nquery {\n continents {\n code\n name\n }\n}",
"variables": "{}",
"headers": "Authorization: Bearer token\nx-api-key: xxx"
}
}
}Dúvidas ou problemas? Contate [email protected]