Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphql-cli-validate-magento-pwa-queries

Package Overview
Dependencies
Maintainers
7
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-cli-validate-magento-pwa-queries

graphql-cli plugin for validating all queries in a Magento 2 PWA project

  • 1.1.0-rc.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
454
increased by33.14%
Maintainers
7
Weekly downloads
 
Created
Source

tested with jest jest

graphql-cli-validate-magento-pwa-queries

Validate your project's GraphQL queries against a schema.

Installation

yarn add graphql-cli graphql-cli-validate-magento-pwa-queries

Summary

Given the following .graphqlconfig:

{
    "projects": {
        "myApp": {
            "schemaPath": "mySchema.json",
            "extensions": {
                "endpoints": {
                    "default": "https://myEndpoint.com/graphql"
                },
                "validate-magento-pwa-queries": {
                    "clients": ["apollo", "literal"],
                    "filesGlob": "src/**/*.{js,graphql,gql}"
                }
            }
        }
    }
}

The command

graphql-cli get-schema --project myApp

will download the GraphQL schema from https://myEndpoint.com/graphql and store it in mySchema.json.

Then the command

graphql-cli validate-magento-pwa-queries --project myApp

will validate all apollo and literal GraphQL queries it finds in .js, .graphql, or .gql files in the src/ directory against that schema.

Options

This plugin supports the following command line options:

OptionDescriptionTypeDefault
--project, -pThe project name as specified in .graphqlconfig.string""

You can also specifiy the following options in your .graphqlconfig:

OptionDescriptionType
--clients, -cGraphQL clients in use in this project.array
--filesGlob, -fA glob used to target files for validation.string

Further Reading

Keywords

FAQs

Package last updated on 20 Sep 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc