GraphQL Chat

Transforming GraphQL into a Conversation

Try it With Your Own Schema

Documentation

We support REST API or LangChain plugin.

Rest API

Send a question using POST and get the answer in JSON format.
const body = JSON.stringify({ question: 'YOUR QUESTION HERE', graphqlEndpoint: "https://[YOUR_GRAPH_QL_ENDPOINT]/graphql", graphqlSchema: "YOUR_GRAPHQL_SCHEMA_HERE", // Usually the generated_schema.graphql file endpointAccessToken: "" // YOUR GRAPHQL ENDPOINT ACCESS_TOKEN if required }) const response = await fetch("https://graphql.chat/api", { method: 'POST', headers: { 'Content-Type': 'application/json', //'Authorization': `Bearer GRAPHQL_CHAT_TOKEN` for access token please contact -> [email protected] // Once you are using access token you can send only the question in the body }, body, }); const jsonResp = await response.json(); // Result will be in the format // jsonResp.answer is the answer to your question // jsonResp.graphqlQuery is the query sent to your graphql endpoint // jsonResp.graphqlAnswer is the answer received from your graphql endpoint // jsonResp.question is the question you asked

LangChain plugin

Use your Graphql API as a tool/plugin for LangChain agent.
const tools = [ // For access token please reach to [email protected] // new GraphqlChat({ // accessToken: "YOUR ACCESS TOKEN HERE" // description: "Query XXX API to answer questions about YYYYY, // Put here your graphql api description // }) new GraphqlChat({ description: "Query a remote github API to answer questions about code/repos ech", // Put here your graphql api description graphqlEndpoint: "https://api.github.com/graphql", // graphqlEndpoint put here your graphql endpoint graphqlSchema: `YOUR_SCHEMA_HERE`, graphqlEndpointAccessToken: ''// Optional, if you need to pass the access token to your graphql endpoint }), ]; const agent = await initializeAgentExecutor( tools, new ChatOpenAI({ temperature: 0 }), "chat-zero-shot-react-description", true ); const result = await agent.call({ input: "What are the oldest open PRs in my repos?", }); console.log({ result });

Use Cases

Customer Support Automation

Streamline your customer support process by providing agents and chatbots with instant access to relevant information from your GraphQL API.

Business Intelligence Insights

Enable executives and managers to ask natural language questions and receive instant, accurate answers based on real-time data from your GraphQL API.

Simplifying API Interactions for Developers

Boost developer productivity by integrating graphql.chat into development tools, enabling natural language queries for debugging, testing, and data exploration.

Voice Assistant Enhancements

Enhance the capabilities of voice assistants like Alexa and Google Home by integrating graphql.chat, allowing users to access real-time data through natural language queries.
Interested in implementing GraphQL.Chat ?
Contact us now.