Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@okam/directus-query
Advanced tools
This library was generated with Nx.
To create a new client, first create a new file with the following content:
import { initDirectusQuery } from '@okam/directus-query'
const queryClient = initDirectusQuery('https://example.com/api', {
credentials: 'include',
mode: 'cors',
fetch,ù
headers: {
Authorization: `Bearer ${process.env.AUTH_TOKEN}`,
},
})
export default queryClient
Then, you can use the client to query data from Directus:
const variables = {id: 1}
const data = await queryClient.queryGql(DOCUMENT, variables)
Those environment variables are used in graphqlRequestClient (queryGql, useSuspenseGqlQuery) and graphqlRequestAdmin (useSuspenseGqlQueryAdmin)
NEXT_SERVER_GRAPHQL_URL=http://server.internal/graphql/ # server side only
NEXT_PUBLIC_GRAPHQL_URL=https://server.okam.one/graphql/ # server fallback and client side
NEXT_PUBLIC_API_TOKEN=abcdef
NEXT_GRAPHQL_URL_ADMIN=http://server-admin.okam.one/graphql/ # server side only
# admin request use the same token NEXT_PUBLIC_API_TOKEN
FAQs
This library was generated with [Nx](https://nx.dev).
We found that @okam/directus-query demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.