1.4.0 • Published 3 years ago

graphql-cli-validate-magento-pwa-queries v1.4.0

Weekly downloads
1,468
License
MIT
Repository
github
Last release
3 years ago

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

1.4.0

3 years ago

1.4.0-rc.1

3 years ago

1.4.0-alpha.3

3 years ago

1.4.0-beta.1

3 years ago

1.4.0-alpha.1

3 years ago

1.4.0-alpha.2

3 years ago

1.3.1

4 years ago

1.3.1-rc.1

4 years ago

1.3.1-alpha.2

4 years ago

1.3.1-alpha.1

4 years ago

1.3.0

4 years ago

1.3.0-rc.1

4 years ago

1.3.0-beta.3

4 years ago

1.3.0-beta.2

4 years ago

1.3.0-beta.1

4 years ago

1.3.0-alpha.1

4 years ago

1.2.0

4 years ago

1.2.0-rc.1

4 years ago

1.2.0-beta.1

4 years ago

1.2.0-alpha.3

4 years ago

1.2.0-alpha.2

4 years ago

1.2.0-alpha.1

4 years ago

1.1.0

5 years ago

1.1.0-rc.1

5 years ago

1.1.0-beta.1

5 years ago

1.1.0-alpha.2

5 years ago

1.1.0-alpha.1

5 years ago

1.0.0

5 years ago