Socket
Socket
Sign inDemoInstall

flake8-graphql

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

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


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

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