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.
graphql-validate-fixtures
Advanced tools
Validates JSON fixtures for GraphQL responses against the associated operations and schema
graphql-validate-fixtures
Validates JSON fixtures for GraphQL responses against the associated operations and schema.
yarn add graphql-validate-fixtures
In order to associate a fixture with a GraphQL query or mutation in your app, you must follow one of these conventions:
@operation
at the top level, which has a string value that is the name of the associated operationOnce this is done, you can validate your fixtures using the CLI or Node.js API.
On startup this tool performs the following actions:
This tool reads schema information from a graphql-config
config file in the project root.
# Must provide a list of fixtures as the first argument
yarn run graphql-validate-fixtures 'src/**/fixtures/**/*.graphql.json'
const {evaluateFixtures} = require('graphql-validate-fixtures');
evaluateFixtures({
fixturePaths: ['test/fixtures/one.json', 'test/fixtures/two.json'],
}).then((results) => {
// See the TypeScript definition file for more details on the
// structure of the `results`
results.forEach((result) => console.log(result));
});
FAQs
Validates JSON fixtures for GraphQL responses against the associated operations and schema
We found that graphql-validate-fixtures 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.