
Research
/Security News
DuckDB npm Account Compromised in Continuing Supply Chain Attack
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
graphiql-plugin-chatgpt
Advanced tools
A GraphiQL plugin to get a generated query based on the current query via ChatGPT API.
Use your favorite package manager to install the package:
# yarn
yarn add graphiql-plugin-chatgpt
# npm
npm install --save graphiql-plugin-chatgpt
The following packages are peer dependencies, so make sure you have them installed as well:
#yarn
yarn add react react-dom graphql @graphiql/react
#npm
npm install --save react react-dom graphql @graphiql/react
import { useChatGPTPlugin } from "graphiql-plugin-chatgpt"
import "graphiql-plugin-chatgpt/dist/graphiql-plugin-chatgpt.css"
function App() {
// ...
const chatGPTPlugin = useChatGPTPlugin({
config: { provider: "openai", apiKey: getOpenAIApiKey() },
userId: getUserId(),
query: query,
onEdit: setQuery,
});
return (
<GraphiQL
query={query}
onEditQuery={setQuery}
plugins={[chatGPTPlugin]}
/>
);
}
field | required | type | description |
---|---|---|---|
config | true | OpenAIProviderConfig | API service config |
query | true | string | Current query |
userId | true | string | User identifier (required to prevent side-effects from other users run) |
onEdit | true | (query: string)=>void | Query setter function (run on Set query button click) |
export type OpenAIProviderConfig = DefaultOpenAIProviderConfig | AzureOpenAIProviderConfig
// You can use your OpenAI api key
// https://platform.openai.com/account/api-keys
type DefaultOpenAIProviderConfig = {
provider: "openai"
apiKey: string
}
type AzureOpenAIProviderConfig = {
provider: "azure"
apiKey: string
endpoint: string
apiVersion: string
}
This project was highly inspired from the @cx0's hackathon project (https://github.com/cx0/chatGPT-for-genetics)
FAQs
Graphiql ChatGPT plugin
The npm package graphiql-plugin-chatgpt receives a total of 1 weekly downloads. As such, graphiql-plugin-chatgpt popularity was classified as not popular.
We found that graphiql-plugin-chatgpt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.