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

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

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

      - type: word
        words:
          - "Invalid Syntax : offending token 'queryy'"
        part: body
# digest: 490a00463044022023644df93113fbc95db522eb9f9a96a67f6b04282dfaf3d3f06ec8157a65338102201ab0150adba185d44b8ba320e2d3684360cf44fef6b982313a400cc173d2b05a:922c64590222798bb761d5b6d8e72950