graphql-cli-validate-magento-pwa-queries
graphql-cli plugin for validating all queries in a Magento 2 PWA project
Last updated 6 months ago by depatil .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install graphql-cli-validate-magento-pwa-queries 
SYNC missed versions from official npm registry.

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:

Option Description Type Default
--project, -p The project name as specified in .graphqlconfig. string ""

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

Option Description Type
--clients, -c GraphQL clients in use in this project. array
--filesGlob, -f A glob used to target files for validation. string

Further Reading

Current Tags

  • 1.3.1-alpha.2                                ...           alpha (4 months ago)
  • 1.3.0-beta.3                                ...           beta (6 months ago)
  • 1.3.0                                ...           latest (6 months ago)
  • 1.3.1-rc.1                                ...           rc (3 months ago)

21 Versions

  • 1.3.1-rc.1                                ...           3 months ago
  • 1.3.1-alpha.2                                ...           4 months ago
  • 1.3.1-alpha.1                                ...           4 months ago
  • 1.3.0                                ...           6 months ago
  • 1.3.0-rc.1                                ...           6 months ago
  • 1.3.0-beta.3                                ...           6 months ago
  • 1.3.0-beta.2                                ...           7 months ago
  • 1.3.0-beta.1                                ...           7 months ago
  • 1.3.0-alpha.1                                ...           7 months ago
  • 1.2.0                                ...           9 months ago
  • 1.2.0-rc.1                                ...           9 months ago
  • 1.2.0-beta.1                                ...           9 months ago
  • 1.2.0-alpha.3                                ...           10 months ago
  • 1.2.0-alpha.2                                ...           10 months ago
  • 1.2.0-alpha.1                                ...           10 months ago
  • 1.1.0                                ...           a year ago
  • 1.1.0-rc.1                                ...           a year ago
  • 1.1.0-beta.1                                ...           a year ago
  • 1.1.0-alpha.2                                ...           a year ago
  • 1.1.0-alpha.1                                ...           a year ago
  • 1.0.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 13
Dependencies (5)
Dev Dependencies (3)

Copyright 2014 - 2016 © taobao.org |