Skip to content

Latest commit

 

History

History
416 lines (410 loc) · 13.1 KB

File metadata and controls

416 lines (410 loc) · 13.1 KB

* This report was auto-generated by graphql-http

GraphQL over HTTP audit report

  • 60 audits in total
  • 46 pass
  • 💡 10 notices (suggestions)
  • ⚠️ 4 warnings (optional)

Passing

  1. 4655 MUST accept application/json and match the content-type
  2. 47DE SHOULD accept */* and use application/json for the content-type
  3. 80D8 SHOULD assume application/json content-type when accept is missing
  4. 82A3 MUST use utf-8 encoding when responding
  5. BF61 MUST accept utf-8 encoded request
  6. 78D5 MUST assume utf-8 in request if encoding is unspecified
  7. 2C94 MUST accept POST requests
  8. 9C48 MAY NOT allow executing mutations on GET requests
  9. 9ABE MAY respond with 4xx status code if content-type is not supplied on POST requests
  10. 03D4 MUST accept application/json POST requests
  11. A5BF MAY use 400 status code when request body is missing on POST
  12. 423L MAY use 400 status code on missing {query} parameter
  13. LKJ1 MAY use 400 status code on number {query} parameter
  14. LKJ2 MAY use 400 status code on boolean {query} parameter
  15. 34A2 SHOULD allow string {query} parameter when accepting application/graphql-response+json
  16. 13EE MUST allow string {query} parameter when accepting application/json
  17. 6C00 MAY use 400 status code on object {operationName} parameter
  18. 6C01 MAY use 400 status code on number {operationName} parameter
  19. 6C02 MAY use 400 status code on boolean {operationName} parameter
  20. 6C03 MAY use 400 status code on array {operationName} parameter
  21. 8161 SHOULD allow string {operationName} parameter when accepting application/graphql-response+json
  22. B8B3 MUST allow string {operationName} parameter when accepting application/json
  23. 94B0 SHOULD allow null {variables} parameter when accepting application/graphql-response+json
  24. 0220 MUST allow null {variables} parameter when accepting application/json
  25. 94B1 SHOULD allow null {operationName} parameter when accepting application/graphql-response+json
  26. 0221 MUST allow null {operationName} parameter when accepting application/json
  27. 94B2 SHOULD allow null {extensions} parameter when accepting application/graphql-response+json
  28. 0222 MUST allow null {extensions} parameter when accepting application/json
  29. 4760 MAY use 400 status code on string {variables} parameter
  30. 4761 MAY use 400 status code on number {variables} parameter
  31. 4762 MAY use 400 status code on boolean {variables} parameter
  32. 2EA1 SHOULD allow map {variables} parameter when accepting application/graphql-response+json
  33. 28B9 MUST allow map {variables} parameter when accepting application/json
  34. 428F SHOULD allow map {extensions} parameter when accepting application/graphql-response+json
  35. 1B7A MUST allow map {extensions} parameter when accepting application/json
  36. B6DC MAY use 4xx or 5xx status codes on JSON parsing failure
  37. BCF8 MAY use 400 status code on JSON parsing failure
  38. 8764 MAY use 4xx or 5xx status codes if parameters are invalid
  39. 3E3A MAY use 400 status code if parameters are invalid
  40. 865D SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
  41. 556A SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json
  42. D586 SHOULD not contain the data entry on document parsing failure when accepting application/graphql-response+json
  43. 51FE SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
  44. 74FF SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json
  45. 5E5B SHOULD not contain the data entry on document validation failure when accepting application/graphql-response+json
  46. 86EE SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json

Notices

The server MAY support these, but are truly optional. These are suggestions following recommended conventions.
  1. 5A70 MAY accept application/x-www-form-urlencoded formatted GET requests
    Response status code is not 200
    {
      "statusText": "Method Not Allowed",
      "status": 405,
      "headers": {
        "keep-alive": "timeout=5",
        "date": "",
        "content-type": "application/json; charset=utf-8",
        "content-length": "60",
        "connection": "keep-alive",
        "allow": "POST, OPTIONS"
      },
      "body": {
        "errors": [
          {
            "message": "Only `POST` requests are allowed."
          }
        ]
      }
    }
    
  2. LKJ0 MAY use 400 status code on object {query} parameter
    Response status code is not 400
    {
      "statusText": "Internal Server Error",
      "status": 500,
      "headers": {
        "keep-alive": "timeout=5",
        "date": "",
        "content-type": "application/json; charset=utf-8",
        "content-length": "77",
        "connection": "keep-alive"
      },
      "body": {
        "errors": [
          {
            "message": "Body must be a string. Received: { obj: \"ect\" }."
          }
        ]
      }
    }
    
  3. LKJ3 MAY use 400 status code on array {query} parameter
    Response status code is not 400
    {
      "statusText": "Internal Server Error",
      "status": 500,
      "headers": {
        "keep-alive": "timeout=5",
        "date": "",
        "content-type": "application/json; charset=utf-8",
        "content-length": "152",
        "connection": "keep-alive"
      },
      "body": {
        "errors": [
          {
            "message": "The \"data\" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Array"
          }
        ]
      }
    }
    
  4. 4763 MAY use 400 status code on array {variables} parameter
    Response status code is not 400
    {
      "statusText": "OK",
      "status": 200,
      "headers": {
        "keep-alive": "timeout=5",
        "date": "",
        "content-type": "application/json; charset=utf-8",
        "content-length": "31",
        "connection": "keep-alive"
      },
      "body": {
        "data": {
          "__typename": "Query"
        }
      }
    }
    
  5. D6D5 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/graphql-response+json
    Response status code is not 200
    {
      "statusText": "Method Not Allowed",
      "status": 405,
      "headers": {
        "keep-alive": "timeout=5",
        "date": "",
        "content-type": "application/json; charset=utf-8",
        "content-length": "60",
        "connection": "keep-alive",
        "allow": "POST, OPTIONS"
      },
      "body": {
        "errors": [
          {
            "message": "Only `POST` requests are allowed."
          }
        ]
      }
    }
    
  6. 6A70 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/json
    Response status code is not 200
    {
      "statusText": "Method Not Allowed",
      "status": 405,
      "headers": {
        "keep-alive": "timeout=5",
        "date": "",
        "content-type": "application/json; charset=utf-8",
        "content-length": "60",
        "connection": "keep-alive",
        "allow": "POST, OPTIONS"
      },
      "body": {
        "errors": [
          {
            "message": "Only `POST` requests are allowed."
          }
        ]
      }
    }
    
  7. 58B0 MAY use 400 status code on string {extensions} parameter
    Response status code is not 400
    {
      "statusText": "OK",
      "status": 200,
      "headers": {
        "keep-alive": "timeout=5",
        "date": "",
        "content-type": "application/json; charset=utf-8",
        "content-length": "31",
        "connection": "keep-alive"
      },
      "body": {
        "data": {
          "__typename": "Query"
        }
      }
    }
    
  8. 58B1 MAY use 400 status code on number {extensions} parameter
    Response status code is not 400
    {
      "statusText": "OK",
      "status": 200,
      "headers": {
        "keep-alive": "timeout=5",
        "date": "",
        "content-type": "application/json; charset=utf-8",
        "content-length": "31",
        "connection": "keep-alive"
      },
      "body": {
        "data": {
          "__typename": "Query"
        }
      }
    }
    
  9. 58B2 MAY use 400 status code on boolean {extensions} parameter
    Response status code is not 400
    {
      "statusText": "OK",
      "status": 200,
      "headers": {
        "keep-alive": "timeout=5",
        "date": "",
        "content-type": "application/json; charset=utf-8",
        "content-length": "31",
        "connection": "keep-alive"
      },
      "body": {
        "data": {
          "__typename": "Query"
        }
      }
    }
    
  10. 58B3 MAY use 400 status code on array {extensions} parameter
    Response status code is not 400
    {
      "statusText": "OK",
      "status": 200,
      "headers": {
        "keep-alive": "timeout=5",
        "date": "",
        "content-type": "application/json; charset=utf-8",
        "content-length": "31",
        "connection": "keep-alive"
      },
      "body": {
        "data": {
          "__typename": "Query"
        }
      }
    }
    

Warnings

The server SHOULD support these, but is not required.
  1. 22EB SHOULD accept application/graphql-response+json and match the content-type
    Response header content-type does not contain application/graphql-response+json
    {
      "statusText": "OK",
      "status": 200,
      "headers": {
        "keep-alive": "timeout=5",
        "date": "",
        "content-type": "application/json; charset=utf-8",
        "content-length": "31",
        "connection": "keep-alive"
      },
      "body": {
        "data": {
          "__typename": "Query"
        }
      }
    }
    
  2. 572B SHOULD use 200 status code on document parsing failure when accepting application/json
    Response status code is not 200
    {
      "statusText": "Bad Request",
      "status": 400,
      "headers": {
        "keep-alive": "timeout=5",
        "date": "",
        "content-type": "application/json; charset=utf-8",
        "content-length": "104",
        "connection": "keep-alive"
      },
      "body": {
        "errors": [
          {
            "message": "Syntax Error: Expected Name, found .",
            "locations": [
              {
                "line": 1,
                "column": 2
              }
            ]
          }
        ]
      }
    }
    
  3. FDE2 SHOULD use 200 status code on document validation failure when accepting application/json
    Response status code is not 200
    {
      "statusText": "Bad Request",
      "status": 400,
      "headers": {
        "keep-alive": "timeout=5",
        "date": "",
        "content-type": "application/json; charset=utf-8",
        "content-length": "123",
        "connection": "keep-alive"
      },
      "body": {
        "errors": [
          {
            "message": "Syntax Error: Invalid number, expected digit but got: \"f\".",
            "locations": [
              {
                "line": 1,
                "column": 4
              }
            ]
          }
        ]
      }
    }
    
  4. 7B9B SHOULD use a status code of 200 on variable coercion failure when accepting application/json
    Response status code is not 200
    {
      "statusText": "Bad Request",
      "status": 400,
      "headers": {
        "keep-alive": "timeout=5",
        "date": "",
        "content-type": "application/json; charset=utf-8",
        "content-length": "126",
        "connection": "keep-alive"
      },
      "body": {
        "errors": [
          {
            "message": "Variable \"$id\" is never used in operation \"CoerceFailure\".",
            "locations": [
              {
                "line": 1,
                "column": 21
              }
            ]
          }
        ]
      }
    }