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: 4b0a00483046022100f293779cf245469032ded46832407d0af2a855db3e3b7c674ebd5dc2a0df698b0221008fde9c0cee051c781e8fba931b12f871b9a32f31bc103d5572bb395ae44cfa57:922c64590222798bb761d5b6d8e72950