id: graphql-flutter-detect
info:
  name: Graphql Flutter Detect
  author: princechaddha
  severity: info
  reference:
    - https://github.com/dolevf/graphw00f/blob/main/graphw00f/lib.py
  tags: tech,graphql,flutter

http:
  - method: POST
    path:
      - "{{BaseURL}}/graphql"
      - "{{BaseURL}}/api/graphql"
      - "{{BaseURL}}/query"
      - "{{BaseURL}}/"
    body: '{"query":"query { __typename @deprecated }"}'
    headers:
      Content-Type: application/json
    redirects: true

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 200
          - 400

      - type: word
        words:
          - 'Directive "deprecated" may not be used on FIELD.'
        part: body
# digest: 4a0a00473045022100aebd91729168f561b415bd706c7477076560b50a46b6dd4b3e831c92db55364c022034066fa46b84c6c820fdcbe46b606378f1355c9f821445b3e7e59803a653485b:922c64590222798bb761d5b6d8e72950