🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

flake8-graphql

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flake8-graphql

A flake8 plugin to lint your graphql queries

0.2.5
97

Supply Chain Security

100

Vulnerability

98

Quality

100

Maintenance

99

License

Unpopular package

Quality

This package is not very popular.

Found 1 instance in 1 package

Maintainers
1

Flake8 GraphQL

|TravisCI| |PyPi|

Plugin for linting graphql query strings within your code.

Mark your query strings with any function or class named gql to perform linting:

.. code:: python

def gql(query):
    return query

myquery = gql("""
{
  empireHero: hero(episode: EMPIRE) {
  name
}
jediHero: hero(episode: JEDI) {
  name
}
""")

You can also customise the identifier to any value with the --gql-identifier option. This can be set with command line arguments or within setup.cfg.

.. code:: shell

$ flake8 --gql-identifier=GQL

.. code:: python

class GQL(str):
    pass

myquery = GQL("""
{
  project(name: "GraphQL") {
    tagline
  }
}
""")

.. |TravisCI| image:: https://travis-ci.org/MichaelAquilina/flake8-graphql.svg?branch=master :target: https://travis-ci.org/MicahelAquilina/flake8-graphql

.. |PyPi| image:: https://badge.fury.io/py/flake8-graphql.svg :target: https://badge.fury.io/py/flake8-graphql

Keywords

FAQs

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