
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
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
npm install graphql-validate-fixtures --save-dev
or, with Yarn:
yarn add graphql-validate-fixtures --dev
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.
# Must provide a list of fixtures as the first argument, as well
# as flags for the path to the schema (`--schema-path`) and operations
# (`--operation-paths`, can be a glob pattern)
yarn run graphql-validate-fixtures 'src/**/fixtures/**/*.graphql.json' --schema-path 'build/schema.json' --operation-paths 'src/**/*.graphql'
const {evaluateFixtures} = require('graphql-validate-fixtures');
evaluateFixtures({
fixturePaths: ['test/fixtures/one.json', 'test/fixtures/two.json'],
schemaPath: 'build/schema.json',
operationPaths: ['src/Home/Home.graphql'],
})
.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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.