GraphQL Explorer
GraphQL Explorer · GPT 작업
GraphQL Guide
Explore a GraphQL endpoint. This can be used to generate GraphQL queries, which can then be validated against the schema and run against the server.
POST /plugin/typesGet all type names. Server should be a full URL including protocolPOST /plugin/schemaGet the schema for several types at once. Server should be a full URL including protocol.POST /plugin/validateValidate a query against a schema. Server should be a full URL including protocol.POST /plugin/runqueryMakes a request to the GraphQL server.
원본 API 스키마
{
"openapi": "3.0.1",
"info": {
"version": "v1",
"title": "GraphQL Guide",
"description": "Explore a GraphQL endpoint. This can be used to generate GraphQL queries, which can then be validated against the schema and run against the server.\n"
},
"servers": [
{
"url": "https://gqlgpt.netlify.app",
"description": "Production server"
}
],
"paths": {
"/plugin/types": {
"post": {
"operationId": "GetTypes",
"summary": "Get all type names. Server should be a full URL including protocol",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"server": {
"type": "string",
"format": "uri",
"description": "The full URL of the GraphQL server."
},
"authHeader": {
"type": "string",
"description": "Optional authentication for the GraphQL server."
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
},
"/plugin/schema": {
"post": {
"operationId": "GetSchemaForTypes",
"summary": "Get the schema for several types at once. Server should be a full URL including protocol.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"server": {
"type": "string",
"format": "uri",
"description": "The full URL of the GraphQL server."
},
"authHeader": {
"type": "string",
"description": "Optional authentication for the GraphQL server."
},
"types": {
"type": "string",
"description": "Comma-separated list of type names for which the schema is requested."
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"types": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
}
}
}
},
"description": "TypeSchema: The schema for a GraphQL type"
}
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/plugin/validate": {
"post": {
"operationId": "ValidateQuery",
"summary": "Validate a query against a schema. Server should be a full URL including protocol.",
"parameters": [
{
"in": "query",
"name": "server",
"schema": {
"type": "string",
"format": "uri"
},
"required": true,
"description": "The full URL of the GraphQL server."
},
{
"in": "query",
"name": "authHeader",
"schema": {
"type": "string"
},
"required": false,
"description": "Optional authentication for the GraphQL server. Passed downstream as the 'Authorization' header. If it is a Bearer, be sure to include the 'Bearer ' prefix. This is never stored or logged."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"valid": {
"description": "Whether the query is valid",
"type": "boolean"
},
"errors": {
"description": "The errors, if any",
"type": "array",
"items": {
"type": "string"
}
},
"message": {
"description": "Important message about the response",
"type": "string"
}
},
"description": "QueryValidationResponse: The response body"
}
}
}
}
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"description": "The GraphQL query to validate",
"type": "string"
},
"variables": {
"description": "The variables to use in the query",
"type": "object"
}
},
"description": "QueryBody: The GraphQL query"
}
}
}
}
}
},
"/plugin/runquery": {
"post": {
"operationId": "RunQuery",
"summary": "Makes a request to the GraphQL server.",
"parameters": [
{
"in": "query",
"name": "server",
"schema": {
"type": "string",
"format": "uri"
},
"required": true,
"description": "The full URL of the GraphQL server."
},
{
"in": "query",
"name": "authHeader",
"schema": {
"type": "string"
},
"required": false,
"description": "Optional authentication for the GraphQL server. Passed downstream as the 'Authorization' header. If it is a Bearer, be sure to include the 'Bearer ' prefix. This is never stored or logged."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object"
},
"error": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
}
}
}
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"description": "The GraphQL query to validate",
"type": "string"
},
"variables": {
"description": "The variables to use in the query",
"type": "object"
}
},
"description": "QueryBody: The GraphQL query"
}
}
}
}
}
}
},
"components": {
"parameters": {
"ServerURL": {
"in": "query",
"name": "server",
"schema": {
"type": "string",
"format": "uri"
},
"required": true,
"description": "The full URL of the GraphQL server."
},
"ServerAuth": {
"in": "query",
"name": "authHeader",
"schema": {
"type": "string"
},
"required": false,
"description": "Optional authentication for the GraphQL server. Passed downstream as the 'Authorization' header. If it is a Bearer, be sure to include the 'Bearer ' prefix. This is never stored or logged."
}
},
"schemas": {
"TypeSchema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
}
}
}
},
"description": "TypeSchema: The schema for a GraphQL type"
},
"QueryValidationResponse": {
"type": "object",
"properties": {
"valid": {
"description": "Whether the query is valid",
"type": "boolean"
},
"errors": {
"description": "The errors, if any",
"type": "array",
"items": {
"type": "string"
}
},
"message": {
"description": "Important message about the response",
"type": "string"
}
},
"description": "QueryValidationResponse: The response body"
},
"QueryBody": {
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"description": "The GraphQL query to validate",
"type": "string"
},
"variables": {
"description": "The variables to use in the query",
"type": "object"
}
},
"description": "QueryBody: The GraphQL query"
}
}
}
}