Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
graphql-schema-linter
Advanced tools
Command line tool and package to validate GraphQL schemas against a set of rules.
This package provides a command line tool to validate GraphQL schema definitions against a set of rules.
If you're looking to lint your GraphQL queries, check out this ESLint plugin: apollographql/eslint-plugin-graphql.
Yarn:
yarn global add graphql-schema-linter
npm:
npm install -g graphql-schema-linter
Usage: graphql-schema-linter [options] [schema.graphql]
Options:
-o, --only <rules>
only the rules specified will be used to validate the schema
example: --only FieldsHaveDescriptions,TypesHaveDescriptions
-e, --except <rules>
all rules except the ones specified will be used to validate the schema
example: --except FieldsHaveDescriptions,TypesHaveDescriptions
-f, --format <format>
choose the output format of the report
possible values: json, text
-s, --stdin
schema definition will be read from STDIN instead of specified file
--version
output the version number
-h, --help
output usage information
DeprecationsHaveAReason
This rule will validate that all deprecations have a reason.
FieldsHaveDescriptions
This rule will validate that all fields have a description.
TypesAreCapitalized
This rule will validate that interface types and object types have capitalized names.
TypesHaveDescriptions
This will will validate that interface types and object types have descriptions.
The format of the output can be controlled via the --format
option.
The following formatters are currently available: text
, json
.
TextFormatter
(default)Sample output:
5:1 The object type `QueryRoot` is missing a description.
6:3 The field `QueryRoot.a` is missing a description.
Each error is prefixed with the line number and column the error occurred on.
JSONFormatter
Sample output:
{
"errors": [
{
"message": "The object type `QueryRoot` is missing a description.",
"location": {
"line": 5,
"column": 1
}
},
{
"message": "The field `QueryRoot.a` is missing a description.",
"location": {
"line": 6,
"column": 3
}
}
]
}
0.0.4 (August 4th, 2017)
--only
and --except
to control what rules get used to validate the schema.--help
and usage.--version
to obtain the version of graphql-schema-linter
.FAQs
Command line tool and package to validate GraphQL schemas against a set of rules.
The npm package graphql-schema-linter receives a total of 54,743 weekly downloads. As such, graphql-schema-linter popularity was classified as popular.
We found that graphql-schema-linter 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.