
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@deepcase/hasura
Advanced tools
[](https://badge.fury.io/js/%40deepcase%2Fhasura) [](https://deepcase.github.io/hasura/) [;
sql template literal for ide highlighting
import { sql } from '@deepcase/hasura/sql';
await api.sql(sql`SELECT * FROM mytable`);
await api.query({
type: 'track_table',
args: {
schema: 'public',
name: 'mytable',
}
});
import { generateApolloClient } from '@deepcase/hasura/client';
import gql from 'graphql-tag';
const client = generateApolloClient({ // all options are optional
ws: true, // need to socket for subscriptions // recommended
secret: 'adminSecretForRoot', // admin secret for root access // not need when token exists
token: 'tokenFromCookiesOrLocalStorage', // token for auth webhook auth // ignored when secret exists
ssl: true; // auto http/https ws/wss protocol
path: 'hasura.domain.com/path', // link to hasura location
headers: {}, // custom additional fields into headers
initialStore: {},
relative: false, // optional
});
client.query({ query: gql`{ links { id }}` }).then(result => console.log(result))
If you need to specify an absolute path as protocol://domain.zone/path
to hasura, you must pass these two options: path
and ssl
const client = generateApolloClient({ // all options are optional
ssl: true;
path: 'hasura.domain.com/path',
});
If you need to specify relative path as /path
to hasura, you must enable the relative mode with the relative
option. In this case, the ssl
option is ignored in http
client, but used in ws
. This can be useful when your build is with some proxy.
const client = generateApolloClient({ // all options are optional
relative: true,
path: 'hasura.domain.com/path',
});
You can also specify relative not locally in your code, but using an ENV variable DEEP_FOUNDATION_HASURA_RELATIVE
or NEXT_PUBLIC_DEEP_FOUNDATION_HASURA_RELATIVE
.
export DEEP_FOUNDATION_HASURA_RELATIVE = 1;
OR
export NEXT_PUBLIC_DEEP_FOUNDATION_HASURA_RELATIVE = 1;
FAQs
[](https://badge.fury.io/js/%40deepcase%2Fhasura) [](https://deepcase.github.io/hasura/) [![develop deepcase](https://badgen.net/bad
We found that @deepcase/hasura demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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 how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.