diff --git a/README.md b/README.md index 561e58e3..bbc37aef 100644 --- a/README.md +++ b/README.md @@ -890,14 +890,10 @@ Their compliance with the [GraphQL over HTTP spec](https://graphql.github.io/gra | Name | Audit | |------|-------| | [apollo-server](https://www.apollographql.com/docs/apollo-server) | [✅ Compliant](/implementations/apollo-server/README.md) | -| [deno](https://deno.com/blog/build-a-graphql-server-with-deno) | [✅ Compliant](/implementations/deno/README.md) | | [graph-client](https://github.com/graphprotocol/graph-client) | [✅ Compliant](/implementations/graph-client/README.md) | -| [graphql-helix](https://www.graphql-helix.com) | [✅ Compliant](/implementations/graphql-helix/README.md) | | [graphql-yoga](https://www.the-guild.dev/graphql/yoga-server) | [✅ Compliant](/implementations/graphql-yoga/README.md) | | [hotchocolate](https://chillicream.com/docs/hotchocolate) | [✅ Compliant](/implementations/hotchocolate/README.md) | -| [lighthouse](https://lighthouse-php.com) | [✅ Compliant](/implementations/lighthouse/README.md) | | [pioneer](https://pioneer.dexclaimation.com) | [✅ Compliant](/implementations/pioneer/README.md) | -| [postgraphile](https://www.graphile.org/postgraphile) | [✅ Compliant](/implementations/postgraphile/README.md) | diff --git a/implementations/apollo-server/README.md b/implementations/apollo-server/README.md index d267c757..902516cc 100644 --- a/implementations/apollo-server/README.md +++ b/implementations/apollo-server/README.md @@ -3,18 +3,18 @@

GraphQL over HTTP audit report

Passing

    -
  1. 22EB SHOULD accept application/graphql-response+json and match the content-type
  2. +
  3. 22EB MUST accept application/graphql-response+json and match the content-type
  4. 4655 MUST accept application/json and match the content-type
  5. -
  6. 47DE SHOULD accept */* and use application/json for the content-type
  7. -
  8. 80D8 SHOULD assume application/json content-type when accept is missing
  9. +
  10. 47DE SHOULD accept */* and use application/graphql-response+json or application/json for the content-type
  11. +
  12. 80D8 SHOULD assume application/json or application/graphql-response+json content-type when accept is missing
  13. 82A3 MUST use utf-8 encoding when responding
  14. BF61 MUST accept utf-8 encoded request
  15. 78D5 MUST assume utf-8 in request if encoding is unspecified
  16. @@ -28,40 +28,48 @@
  17. LKJ1 MAY use 400 status code on number {query} parameter
  18. LKJ2 MAY use 400 status code on boolean {query} parameter
  19. LKJ3 MAY use 400 status code on array {query} parameter
  20. -
  21. 34A2 SHOULD allow string {query} parameter when accepting application/graphql-response+json
  22. +
  23. 34A2 MUST allow string {query} parameter when accepting application/graphql-response+json
  24. 13EE MUST allow string {query} parameter when accepting application/json
  25. 6C00 MAY use 400 status code on object {operationName} parameter
  26. 6C01 MAY use 400 status code on number {operationName} parameter
  27. 6C02 MAY use 400 status code on boolean {operationName} parameter
  28. 6C03 MAY use 400 status code on array {operationName} parameter
  29. -
  30. 8161 SHOULD allow string {operationName} parameter when accepting application/graphql-response+json
  31. +
  32. 8161 MUST allow string {operationName} parameter when accepting application/graphql-response+json
  33. B8B3 MUST allow string {operationName} parameter when accepting application/json
  34. -
  35. 94B0 SHOULD allow null {variables} parameter when accepting application/graphql-response+json
  36. +
  37. 94B0 MUST allow null {variables} parameter when accepting application/graphql-response+json
  38. 0220 MUST allow null {variables} parameter when accepting application/json
  39. -
  40. 94B1 SHOULD allow null {operationName} parameter when accepting application/graphql-response+json
  41. +
  42. 94B1 MUST allow null {operationName} parameter when accepting application/graphql-response+json
  43. 0221 MUST allow null {operationName} parameter when accepting application/json
  44. -
  45. 94B2 SHOULD allow null {extensions} parameter when accepting application/graphql-response+json
  46. +
  47. 94B2 MUST allow null {extensions} parameter when accepting application/graphql-response+json
  48. 0222 MUST allow null {extensions} parameter when accepting application/json
  49. 4760 MAY use 400 status code on string {variables} parameter
  50. 4761 MAY use 400 status code on number {variables} parameter
  51. 4762 MAY use 400 status code on boolean {variables} parameter
  52. 4763 MAY use 400 status code on array {variables} parameter
  53. -
  54. 2EA1 SHOULD allow map {variables} parameter when accepting application/graphql-response+json
  55. +
  56. 2EA1 MUST allow map {variables} parameter when accepting application/graphql-response+json
  57. 28B9 MUST allow map {variables} parameter when accepting application/json
  58. -
  59. 58B0 MAY use 400 status code on string {extensions} parameter
  60. -
  61. 58B1 MAY use 400 status code on number {extensions} parameter
  62. -
  63. 58B2 MAY use 400 status code on boolean {extensions} parameter
  64. -
  65. 58B3 MAY use 400 status code on array {extensions} parameter
  66. -
  67. 428F SHOULD allow map {extensions} parameter when accepting application/graphql-response+json
  68. +
  69. 0280 MUST use 4xx or 5xx status codes on string {extensions} parameter when accepting application/graphql-response+json
  70. +
  71. 0281 MUST use 4xx or 5xx status codes on number {extensions} parameter when accepting application/graphql-response+json
  72. +
  73. 0282 MUST use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/graphql-response+json
  74. +
  75. 0283 MUST use 4xx or 5xx status codes on array {extensions} parameter when accepting application/graphql-response+json
  76. +
  77. 2330 SHOULD use 4xx status code on string {extensions} parameter when accepting application/graphql-response+json
  78. +
  79. 2331 SHOULD use 4xx status code on number {extensions} parameter when accepting application/graphql-response+json
  80. +
  81. 2332 SHOULD use 4xx status code on boolean {extensions} parameter when accepting application/graphql-response+json
  82. +
  83. 2333 SHOULD use 4xx status code on array {extensions} parameter when accepting application/graphql-response+json
  84. +
  85. 58B0 SHOULD use 4xx or 5xx status codes on string {extensions} parameter when accepting application/json
  86. +
  87. 58B1 SHOULD use 4xx or 5xx status codes on number {extensions} parameter when accepting application/json
  88. +
  89. 58B2 SHOULD use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/json
  90. +
  91. 58B3 SHOULD use 4xx or 5xx status codes on array {extensions} parameter when accepting application/json
  92. +
  93. 428F MUST allow map {extensions} parameter when accepting application/graphql-response+json
  94. 1B7A MUST allow map {extensions} parameter when accepting application/json
  95. B6DC MAY use 4xx or 5xx status codes on JSON parsing failure
  96. BCF8 MAY use 400 status code on JSON parsing failure
  97. 8764 MAY use 4xx or 5xx status codes if parameters are invalid
  98. 3E3A MAY use 400 status code if parameters are invalid
  99. -
  100. 865D SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
  101. +
  102. 865D MUST use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
  103. 556A SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json
  104. D586 SHOULD not contain the data entry on document parsing failure when accepting application/graphql-response+json
  105. -
  106. 51FE SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
  107. +
  108. 51FE MUST use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
  109. 74FF SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json
  110. 5E5B SHOULD not contain the data entry on document validation failure when accepting application/graphql-response+json
  111. 86EE SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json
  112. diff --git a/implementations/apollo-server/report.json b/implementations/apollo-server/report.json index 2476acfc..c5c3d982 100644 --- a/implementations/apollo-server/report.json +++ b/implementations/apollo-server/report.json @@ -1,6 +1,6 @@ { - "total": 60, - "ok": 54, + "total": 68, + "ok": 62, "notice": 3, "warn": 3, "error": 0 diff --git a/implementations/deno/README.md b/implementations/deno/README.md index 4712b2be..7d457a37 100644 --- a/implementations/deno/README.md +++ b/implementations/deno/README.md @@ -3,17 +3,18 @@

    GraphQL over HTTP audit report

    Passing

    1. 4655 MUST accept application/json and match the content-type
    2. -
    3. 47DE SHOULD accept */* and use application/json for the content-type
    4. -
    5. 80D8 SHOULD assume application/json content-type when accept is missing
    6. +
    7. 47DE SHOULD accept */* and use application/graphql-response+json or application/json for the content-type
    8. +
    9. 80D8 SHOULD assume application/json or application/graphql-response+json content-type when accept is missing
    10. 82A3 MUST use utf-8 encoding when responding
    11. BF61 MUST accept utf-8 encoded request
    12. 78D5 MUST assume utf-8 in request if encoding is unspecified
    13. @@ -32,14 +33,22 @@
    14. 4761 MAY use 400 status code on number {variables} parameter
    15. 4762 MAY use 400 status code on boolean {variables} parameter
    16. 28B9 MUST allow map {variables} parameter when accepting application/json
    17. +
    18. 0280 MUST use 4xx or 5xx status codes on string {extensions} parameter when accepting application/graphql-response+json
    19. +
    20. 0281 MUST use 4xx or 5xx status codes on number {extensions} parameter when accepting application/graphql-response+json
    21. +
    22. 0282 MUST use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/graphql-response+json
    23. +
    24. 0283 MUST use 4xx or 5xx status codes on array {extensions} parameter when accepting application/graphql-response+json
    25. +
    26. 2330 SHOULD use 4xx status code on string {extensions} parameter when accepting application/graphql-response+json
    27. +
    28. 2331 SHOULD use 4xx status code on number {extensions} parameter when accepting application/graphql-response+json
    29. +
    30. 2332 SHOULD use 4xx status code on boolean {extensions} parameter when accepting application/graphql-response+json
    31. +
    32. 2333 SHOULD use 4xx status code on array {extensions} parameter when accepting application/graphql-response+json
    33. 1B7A MUST allow map {extensions} parameter when accepting application/json
    34. B6DC MAY use 4xx or 5xx status codes on JSON parsing failure
    35. BCF8 MAY use 400 status code on JSON parsing failure
    36. 572B SHOULD use 200 status code on document parsing failure when accepting application/json
    37. FDE2 SHOULD use 200 status code on document validation failure when accepting application/json
    38. 7B9B SHOULD use a status code of 200 on variable coercion failure when accepting application/json
    39. -
    40. 865D SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
    41. -
    42. 51FE SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
    43. +
    44. 865D MUST use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
    45. +
    46. 51FE MUST use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json

    Notices

    @@ -315,9 +324,9 @@ The server MAY support these, but are truly optional. These are suggestio -
  113. 58B0 MAY use 400 status code on string {extensions} parameter +
  114. 8764 MAY use 4xx or 5xx status codes if parameters are invalid
    -Response status code is not 400 +Response status is not between 400 and 599
    {
       "statusText": "OK",
       "status": 200,
    @@ -325,19 +334,19 @@ The server MAY support these, but are truly optional. These are suggestio
         "vary": "Accept-Encoding",
         "date": "",
         "content-type": "application/json",
    -    "content-length": "59",
    +    "content-length": "45",
         "content-encoding": "gzip"
       },
       "body": {
    -    "data": {
    -      "__typename": "Query"
    -    }
    +    "errors": [
    +      {}
    +    ]
       }
     }
     
  115. -
  116. 58B1 MAY use 400 status code on number {extensions} parameter +
  117. 3E3A MAY use 400 status code if parameters are invalid
    Response status code is not 400
    {
    @@ -347,21 +356,26 @@ The server MAY support these, but are truly optional. These are suggestio
         "vary": "Accept-Encoding",
         "date": "",
         "content-type": "application/json",
    -    "content-length": "59",
    +    "content-length": "45",
         "content-encoding": "gzip"
       },
       "body": {
    -    "data": {
    -      "__typename": "Query"
    -    }
    +    "errors": [
    +      {}
    +    ]
       }
     }
     
  118. -
  119. 58B2 MAY use 400 status code on boolean {extensions} parameter +
+ +

Warnings

+The server SHOULD support these, but is not required. +
    +
  1. 58B0 SHOULD use 4xx or 5xx status codes on string {extensions} parameter when accepting application/json
    -Response status code is not 400 +Response status is not between 400 and 599
    {
       "statusText": "OK",
       "status": 200,
    @@ -381,9 +395,9 @@ The server MAY support these, but are truly optional. These are suggestio
     
  2. -
  3. 58B3 MAY use 400 status code on array {extensions} parameter +
  4. 58B1 SHOULD use 4xx or 5xx status codes on number {extensions} parameter when accepting application/json
    -Response status code is not 400 +Response status is not between 400 and 599
    {
       "statusText": "OK",
       "status": 200,
    @@ -403,7 +417,7 @@ The server MAY support these, but are truly optional. These are suggestio
     
  5. -
  6. 8764 MAY use 4xx or 5xx status codes if parameters are invalid +
  7. 58B2 SHOULD use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/json
    Response status is not between 400 and 599
    {
    @@ -413,21 +427,21 @@ The server MAY support these, but are truly optional. These are suggestio
         "vary": "Accept-Encoding",
         "date": "",
         "content-type": "application/json",
    -    "content-length": "45",
    +    "content-length": "59",
         "content-encoding": "gzip"
       },
       "body": {
    -    "errors": [
    -      {}
    -    ]
    +    "data": {
    +      "__typename": "Query"
    +    }
       }
     }
     
  8. -
  9. 3E3A MAY use 400 status code if parameters are invalid +
  10. 58B3 SHOULD use 4xx or 5xx status codes on array {extensions} parameter when accepting application/json
    -Response status code is not 400 +Response status is not between 400 and 599
    {
       "statusText": "OK",
       "status": 200,
    @@ -435,26 +449,21 @@ The server MAY support these, but are truly optional. These are suggestio
         "vary": "Accept-Encoding",
         "date": "",
         "content-type": "application/json",
    -    "content-length": "45",
    +    "content-length": "59",
         "content-encoding": "gzip"
       },
       "body": {
    -    "errors": [
    -      {}
    -    ]
    +    "data": {
    +      "__typename": "Query"
    +    }
       }
     }
     
  11. -
- -

Warnings

-The server SHOULD support these, but is not required. -
    -
  1. 22EB SHOULD accept application/graphql-response+json and match the content-type +
  2. 556A SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json
    -Response status code is not 200 +Response status code is not 400
    {
       "statusText": "Not Acceptable",
       "status": 406,
    @@ -469,9 +478,9 @@ The server SHOULD support these, but is not required.
     
  3. -
  4. 34A2 SHOULD allow string {query} parameter when accepting application/graphql-response+json +
  5. D586 SHOULD not contain the data entry on document parsing failure when accepting application/graphql-response+json
    -Response status code is not 200 +Response body is not valid JSON
    {
       "statusText": "Not Acceptable",
       "status": 406,
    @@ -481,14 +490,14 @@ The server SHOULD support these, but is not required.
         "content-type": "text/plain;charset=UTF-8",
         "content-length": "14"
       },
    -  "body": "Not Acceptable"
    +  "body": null
     }
     
  6. -
  7. 8161 SHOULD allow string {operationName} parameter when accepting application/graphql-response+json +
  8. 74FF SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json
    -Response status code is not 200 +Response status code is not 400
    {
       "statusText": "Not Acceptable",
       "status": 406,
    @@ -503,9 +512,9 @@ The server SHOULD support these, but is not required.
     
  9. -
  10. 94B0 SHOULD allow null {variables} parameter when accepting application/graphql-response+json +
  11. 5E5B SHOULD not contain the data entry on document validation failure when accepting application/graphql-response+json
    -Response status code is not 200 +Response body is not valid JSON
    {
       "statusText": "Not Acceptable",
       "status": 406,
    @@ -515,14 +524,14 @@ The server SHOULD support these, but is not required.
         "content-type": "text/plain;charset=UTF-8",
         "content-length": "14"
       },
    -  "body": "Not Acceptable"
    +  "body": null
     }
     
  12. -
  13. 94B1 SHOULD allow null {operationName} parameter when accepting application/graphql-response+json +
  14. 86EE SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json
    -Response status code is not 200 +Response status code is not 400
    {
       "statusText": "Not Acceptable",
       "status": 406,
    @@ -537,7 +546,12 @@ The server SHOULD support these, but is not required.
     
  15. -
  16. 94B2 SHOULD allow null {extensions} parameter when accepting application/graphql-response+json +
+ +

Errors

+The server MUST support these. +
    +
  1. 22EB MUST accept application/graphql-response+json and match the content-type
    Response status code is not 200
    {
    @@ -554,7 +568,7 @@ The server SHOULD support these, but is not required.
     
  2. -
  3. 2EA1 SHOULD allow map {variables} parameter when accepting application/graphql-response+json +
  4. 34A2 MUST allow string {query} parameter when accepting application/graphql-response+json
    Response status code is not 200
    {
    @@ -571,7 +585,7 @@ The server SHOULD support these, but is not required.
     
  5. -
  6. 428F SHOULD allow map {extensions} parameter when accepting application/graphql-response+json +
  7. 8161 MUST allow string {operationName} parameter when accepting application/graphql-response+json
    Response status code is not 200
    {
    @@ -588,9 +602,9 @@ The server SHOULD support these, but is not required.
     
  8. -
  9. 556A SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json +
  10. 94B0 MUST allow null {variables} parameter when accepting application/graphql-response+json
    -Response status code is not 400 +Response status code is not 200
    {
       "statusText": "Not Acceptable",
       "status": 406,
    @@ -605,9 +619,9 @@ The server SHOULD support these, but is not required.
     
  11. -
  12. D586 SHOULD not contain the data entry on document parsing failure when accepting application/graphql-response+json +
  13. 94B1 MUST allow null {operationName} parameter when accepting application/graphql-response+json
    -Response body is not valid JSON +Response status code is not 200
    {
       "statusText": "Not Acceptable",
       "status": 406,
    @@ -617,14 +631,14 @@ The server SHOULD support these, but is not required.
         "content-type": "text/plain;charset=UTF-8",
         "content-length": "14"
       },
    -  "body": null
    +  "body": "Not Acceptable"
     }
     
  14. -
  15. 74FF SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json +
  16. 94B2 MUST allow null {extensions} parameter when accepting application/graphql-response+json
    -Response status code is not 400 +Response status code is not 200
    {
       "statusText": "Not Acceptable",
       "status": 406,
    @@ -639,9 +653,9 @@ The server SHOULD support these, but is not required.
     
  17. -
  18. 5E5B SHOULD not contain the data entry on document validation failure when accepting application/graphql-response+json +
  19. 2EA1 MUST allow map {variables} parameter when accepting application/graphql-response+json
    -Response body is not valid JSON +Response status code is not 200
    {
       "statusText": "Not Acceptable",
       "status": 406,
    @@ -651,14 +665,14 @@ The server SHOULD support these, but is not required.
         "content-type": "text/plain;charset=UTF-8",
         "content-length": "14"
       },
    -  "body": null
    +  "body": "Not Acceptable"
     }
     
  20. -
  21. 86EE SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json +
  22. 428F MUST allow map {extensions} parameter when accepting application/graphql-response+json
    -Response status code is not 400 +Response status code is not 200
    {
       "statusText": "Not Acceptable",
       "status": 406,
    @@ -674,4 +688,3 @@ The server SHOULD support these, but is not required.
     
- diff --git a/implementations/deno/report.json b/implementations/deno/report.json index b5658aa1..41591878 100644 --- a/implementations/deno/report.json +++ b/implementations/deno/report.json @@ -1,7 +1,7 @@ { - "total": 60, - "ok": 29, - "notice": 18, - "warn": 13, - "error": 0 + "total": 68, + "ok": 37, + "notice": 14, + "warn": 9, + "error": 8 } diff --git a/implementations/express-graphql/README.md b/implementations/express-graphql/README.md index 50299fd3..317b1962 100644 --- a/implementations/express-graphql/README.md +++ b/implementations/express-graphql/README.md @@ -3,17 +3,18 @@

GraphQL over HTTP audit report

Passing

  1. 4655 MUST accept application/json and match the content-type
  2. -
  3. 47DE SHOULD accept */* and use application/json for the content-type
  4. -
  5. 80D8 SHOULD assume application/json content-type when accept is missing
  6. +
  7. 47DE SHOULD accept */* and use application/graphql-response+json or application/json for the content-type
  8. +
  9. 80D8 SHOULD assume application/json or application/graphql-response+json content-type when accept is missing
  10. 82A3 MUST use utf-8 encoding when responding
  11. BF61 MUST accept utf-8 encoded request
  12. 78D5 MUST assume utf-8 in request if encoding is unspecified
  13. @@ -28,31 +29,31 @@
  14. LKJ1 MAY use 400 status code on number {query} parameter
  15. LKJ2 MAY use 400 status code on boolean {query} parameter
  16. LKJ3 MAY use 400 status code on array {query} parameter
  17. -
  18. 34A2 SHOULD allow string {query} parameter when accepting application/graphql-response+json
  19. +
  20. 34A2 MUST allow string {query} parameter when accepting application/graphql-response+json
  21. 13EE MUST allow string {query} parameter when accepting application/json
  22. -
  23. 8161 SHOULD allow string {operationName} parameter when accepting application/graphql-response+json
  24. +
  25. 8161 MUST allow string {operationName} parameter when accepting application/graphql-response+json
  26. B8B3 MUST allow string {operationName} parameter when accepting application/json
  27. -
  28. 94B0 SHOULD allow null {variables} parameter when accepting application/graphql-response+json
  29. +
  30. 94B0 MUST allow null {variables} parameter when accepting application/graphql-response+json
  31. 0220 MUST allow null {variables} parameter when accepting application/json
  32. -
  33. 94B1 SHOULD allow null {operationName} parameter when accepting application/graphql-response+json
  34. +
  35. 94B1 MUST allow null {operationName} parameter when accepting application/graphql-response+json
  36. 0221 MUST allow null {operationName} parameter when accepting application/json
  37. -
  38. 94B2 SHOULD allow null {extensions} parameter when accepting application/graphql-response+json
  39. +
  40. 94B2 MUST allow null {extensions} parameter when accepting application/graphql-response+json
  41. 0222 MUST allow null {extensions} parameter when accepting application/json
  42. 4760 MAY use 400 status code on string {variables} parameter
  43. -
  44. 2EA1 SHOULD allow map {variables} parameter when accepting application/graphql-response+json
  45. +
  46. 2EA1 MUST allow map {variables} parameter when accepting application/graphql-response+json
  47. 28B9 MUST allow map {variables} parameter when accepting application/json
  48. D6D5 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/graphql-response+json
  49. 6A70 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/json
  50. -
  51. 428F SHOULD allow map {extensions} parameter when accepting application/graphql-response+json
  52. +
  53. 428F MUST allow map {extensions} parameter when accepting application/graphql-response+json
  54. 1B7A MUST allow map {extensions} parameter when accepting application/json
  55. B6DC MAY use 4xx or 5xx status codes on JSON parsing failure
  56. BCF8 MAY use 400 status code on JSON parsing failure
  57. 8764 MAY use 4xx or 5xx status codes if parameters are invalid
  58. 3E3A MAY use 400 status code if parameters are invalid
  59. -
  60. 865D SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
  61. +
  62. 865D MUST use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
  63. 556A SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json
  64. D586 SHOULD not contain the data entry on document parsing failure when accepting application/graphql-response+json
  65. -
  66. 51FE SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
  67. +
  68. 51FE MUST use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
  69. 74FF SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json
  70. 5E5B SHOULD not contain the data entry on document validation failure when accepting application/graphql-response+json
  71. 86EE SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json
  72. @@ -229,9 +230,14 @@ The server MAY support these, but are truly optional. These are suggestio
    -
  73. 58B0 MAY use 400 status code on string {extensions} parameter +
+ +

Warnings

+The server SHOULD support these, but is not required. +
    +
  1. 2330 SHOULD use 4xx status code on string {extensions} parameter when accepting application/graphql-response+json
    -Response status code is not 400 +Response status is not between 400 and 499
    {
       "statusText": "OK",
       "status": 200,
    @@ -253,9 +259,9 @@ The server MAY support these, but are truly optional. These are suggestio
     
  2. -
  3. 58B1 MAY use 400 status code on number {extensions} parameter +
  4. 2331 SHOULD use 4xx status code on number {extensions} parameter when accepting application/graphql-response+json
    -Response status code is not 400 +Response status is not between 400 and 499
    {
       "statusText": "OK",
       "status": 200,
    @@ -277,9 +283,9 @@ The server MAY support these, but are truly optional. These are suggestio
     
  5. -
  6. 58B2 MAY use 400 status code on boolean {extensions} parameter +
  7. 2332 SHOULD use 4xx status code on boolean {extensions} parameter when accepting application/graphql-response+json
    -Response status code is not 400 +Response status is not between 400 and 499
    {
       "statusText": "OK",
       "status": 200,
    @@ -301,9 +307,9 @@ The server MAY support these, but are truly optional. These are suggestio
     
  8. -
  9. 58B3 MAY use 400 status code on array {extensions} parameter +
  10. 2333 SHOULD use 4xx status code on array {extensions} parameter when accepting application/graphql-response+json
    -Response status code is not 400 +Response status is not between 400 and 499
    {
       "statusText": "OK",
       "status": 200,
    @@ -325,14 +331,81 @@ The server MAY support these, but are truly optional. These are suggestio
     
  11. -
- -

Warnings

-The server SHOULD support these, but is not required. -
    -
  1. 22EB SHOULD accept application/graphql-response+json and match the content-type +
  2. 58B0 SHOULD use 4xx or 5xx status codes on string {extensions} parameter when accepting application/json
    -Response header content-type does not contain application/graphql-response+json +Response status is not between 400 and 599 +
    {
    +  "statusText": "OK",
    +  "status": 200,
    +  "headers": {
    +    "x-powered-by": "Express",
    +    "keep-alive": "timeout=5",
    +    "etag": "W/\"1f-yOwhVHjWKeagyuteVuktj+6mcMg\"",
    +    "date": "",
    +    "content-type": "application/json; charset=utf-8",
    +    "content-length": "31",
    +    "connection": "keep-alive"
    +  },
    +  "body": {
    +    "data": {
    +      "__typename": "Query"
    +    }
    +  }
    +}
    +
    +
    +
  3. +
  4. 58B1 SHOULD use 4xx or 5xx status codes on number {extensions} parameter when accepting application/json +
    +Response status is not between 400 and 599 +
    {
    +  "statusText": "OK",
    +  "status": 200,
    +  "headers": {
    +    "x-powered-by": "Express",
    +    "keep-alive": "timeout=5",
    +    "etag": "W/\"1f-yOwhVHjWKeagyuteVuktj+6mcMg\"",
    +    "date": "",
    +    "content-type": "application/json; charset=utf-8",
    +    "content-length": "31",
    +    "connection": "keep-alive"
    +  },
    +  "body": {
    +    "data": {
    +      "__typename": "Query"
    +    }
    +  }
    +}
    +
    +
    +
  5. +
  6. 58B2 SHOULD use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/json +
    +Response status is not between 400 and 599 +
    {
    +  "statusText": "OK",
    +  "status": 200,
    +  "headers": {
    +    "x-powered-by": "Express",
    +    "keep-alive": "timeout=5",
    +    "etag": "W/\"1f-yOwhVHjWKeagyuteVuktj+6mcMg\"",
    +    "date": "",
    +    "content-type": "application/json; charset=utf-8",
    +    "content-length": "31",
    +    "connection": "keep-alive"
    +  },
    +  "body": {
    +    "data": {
    +      "__typename": "Query"
    +    }
    +  }
    +}
    +
    +
    +
  7. +
  8. 58B3 SHOULD use 4xx or 5xx status codes on array {extensions} parameter when accepting application/json +
    +Response status is not between 400 and 599
    {
       "statusText": "OK",
       "status": 200,
    @@ -461,3 +534,127 @@ The server SHOULD support these, but is not required.
     
+

Errors

+The server MUST support these. +
    +
  1. 22EB MUST 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": {
    +    "x-powered-by": "Express",
    +    "keep-alive": "timeout=5",
    +    "etag": "W/\"1f-yOwhVHjWKeagyuteVuktj+6mcMg\"",
    +    "date": "",
    +    "content-type": "application/json; charset=utf-8",
    +    "content-length": "31",
    +    "connection": "keep-alive"
    +  },
    +  "body": {
    +    "data": {
    +      "__typename": "Query"
    +    }
    +  }
    +}
    +
    +
    +
  2. +
  3. 0280 MUST use 4xx or 5xx status codes on string {extensions} parameter when accepting application/graphql-response+json +
    +Response status is not between 400 and 599 +
    {
    +  "statusText": "OK",
    +  "status": 200,
    +  "headers": {
    +    "x-powered-by": "Express",
    +    "keep-alive": "timeout=5",
    +    "etag": "W/\"1f-yOwhVHjWKeagyuteVuktj+6mcMg\"",
    +    "date": "",
    +    "content-type": "application/json; charset=utf-8",
    +    "content-length": "31",
    +    "connection": "keep-alive"
    +  },
    +  "body": {
    +    "data": {
    +      "__typename": "Query"
    +    }
    +  }
    +}
    +
    +
    +
  4. +
  5. 0281 MUST use 4xx or 5xx status codes on number {extensions} parameter when accepting application/graphql-response+json +
    +Response status is not between 400 and 599 +
    {
    +  "statusText": "OK",
    +  "status": 200,
    +  "headers": {
    +    "x-powered-by": "Express",
    +    "keep-alive": "timeout=5",
    +    "etag": "W/\"1f-yOwhVHjWKeagyuteVuktj+6mcMg\"",
    +    "date": "",
    +    "content-type": "application/json; charset=utf-8",
    +    "content-length": "31",
    +    "connection": "keep-alive"
    +  },
    +  "body": {
    +    "data": {
    +      "__typename": "Query"
    +    }
    +  }
    +}
    +
    +
    +
  6. +
  7. 0282 MUST use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/graphql-response+json +
    +Response status is not between 400 and 599 +
    {
    +  "statusText": "OK",
    +  "status": 200,
    +  "headers": {
    +    "x-powered-by": "Express",
    +    "keep-alive": "timeout=5",
    +    "etag": "W/\"1f-yOwhVHjWKeagyuteVuktj+6mcMg\"",
    +    "date": "",
    +    "content-type": "application/json; charset=utf-8",
    +    "content-length": "31",
    +    "connection": "keep-alive"
    +  },
    +  "body": {
    +    "data": {
    +      "__typename": "Query"
    +    }
    +  }
    +}
    +
    +
    +
  8. +
  9. 0283 MUST use 4xx or 5xx status codes on array {extensions} parameter when accepting application/graphql-response+json +
    +Response status is not between 400 and 599 +
    {
    +  "statusText": "OK",
    +  "status": 200,
    +  "headers": {
    +    "x-powered-by": "Express",
    +    "keep-alive": "timeout=5",
    +    "etag": "W/\"1f-yOwhVHjWKeagyuteVuktj+6mcMg\"",
    +    "date": "",
    +    "content-type": "application/json; charset=utf-8",
    +    "content-length": "31",
    +    "connection": "keep-alive"
    +  },
    +  "body": {
    +    "data": {
    +      "__typename": "Query"
    +    }
    +  }
    +}
    +
    +
    +
  10. +
diff --git a/implementations/express-graphql/report.json b/implementations/express-graphql/report.json index 4099d182..7f98e925 100644 --- a/implementations/express-graphql/report.json +++ b/implementations/express-graphql/report.json @@ -1,7 +1,7 @@ { - "total": 60, + "total": 68, "ok": 45, - "notice": 11, - "warn": 4, - "error": 0 + "notice": 7, + "warn": 11, + "error": 5 } diff --git a/implementations/graph-client/README.md b/implementations/graph-client/README.md index 364f93c2..dfd5357a 100644 --- a/implementations/graph-client/README.md +++ b/implementations/graph-client/README.md @@ -3,17 +3,17 @@

GraphQL over HTTP audit report

Passing

    -
  1. 22EB SHOULD accept application/graphql-response+json and match the content-type
  2. +
  3. 22EB MUST accept application/graphql-response+json and match the content-type
  4. 4655 MUST accept application/json and match the content-type
  5. -
  6. 47DE SHOULD accept */* and use application/json for the content-type
  7. -
  8. 80D8 SHOULD assume application/json content-type when accept is missing
  9. +
  10. 47DE SHOULD accept */* and use application/graphql-response+json or application/json for the content-type
  11. +
  12. 80D8 SHOULD assume application/json or application/graphql-response+json content-type when accept is missing
  13. 82A3 MUST use utf-8 encoding when responding
  14. BF61 MUST accept utf-8 encoded request
  15. 78D5 MUST assume utf-8 in request if encoding is unspecified
  16. @@ -27,43 +27,51 @@
  17. LKJ1 MAY use 400 status code on number {query} parameter
  18. LKJ2 MAY use 400 status code on boolean {query} parameter
  19. LKJ3 MAY use 400 status code on array {query} parameter
  20. -
  21. 34A2 SHOULD allow string {query} parameter when accepting application/graphql-response+json
  22. +
  23. 34A2 MUST allow string {query} parameter when accepting application/graphql-response+json
  24. 13EE MUST allow string {query} parameter when accepting application/json
  25. 6C00 MAY use 400 status code on object {operationName} parameter
  26. 6C01 MAY use 400 status code on number {operationName} parameter
  27. 6C02 MAY use 400 status code on boolean {operationName} parameter
  28. 6C03 MAY use 400 status code on array {operationName} parameter
  29. -
  30. 8161 SHOULD allow string {operationName} parameter when accepting application/graphql-response+json
  31. +
  32. 8161 MUST allow string {operationName} parameter when accepting application/graphql-response+json
  33. B8B3 MUST allow string {operationName} parameter when accepting application/json
  34. -
  35. 94B0 SHOULD allow null {variables} parameter when accepting application/graphql-response+json
  36. +
  37. 94B0 MUST allow null {variables} parameter when accepting application/graphql-response+json
  38. 0220 MUST allow null {variables} parameter when accepting application/json
  39. -
  40. 94B1 SHOULD allow null {operationName} parameter when accepting application/graphql-response+json
  41. +
  42. 94B1 MUST allow null {operationName} parameter when accepting application/graphql-response+json
  43. 0221 MUST allow null {operationName} parameter when accepting application/json
  44. -
  45. 94B2 SHOULD allow null {extensions} parameter when accepting application/graphql-response+json
  46. +
  47. 94B2 MUST allow null {extensions} parameter when accepting application/graphql-response+json
  48. 0222 MUST allow null {extensions} parameter when accepting application/json
  49. 4760 MAY use 400 status code on string {variables} parameter
  50. 4761 MAY use 400 status code on number {variables} parameter
  51. 4762 MAY use 400 status code on boolean {variables} parameter
  52. 4763 MAY use 400 status code on array {variables} parameter
  53. -
  54. 2EA1 SHOULD allow map {variables} parameter when accepting application/graphql-response+json
  55. +
  56. 2EA1 MUST allow map {variables} parameter when accepting application/graphql-response+json
  57. 28B9 MUST allow map {variables} parameter when accepting application/json
  58. D6D5 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/graphql-response+json
  59. 6A70 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/json
  60. -
  61. 58B0 MAY use 400 status code on string {extensions} parameter
  62. -
  63. 58B1 MAY use 400 status code on number {extensions} parameter
  64. -
  65. 58B2 MAY use 400 status code on boolean {extensions} parameter
  66. -
  67. 58B3 MAY use 400 status code on array {extensions} parameter
  68. -
  69. 428F SHOULD allow map {extensions} parameter when accepting application/graphql-response+json
  70. +
  71. 0280 MUST use 4xx or 5xx status codes on string {extensions} parameter when accepting application/graphql-response+json
  72. +
  73. 0281 MUST use 4xx or 5xx status codes on number {extensions} parameter when accepting application/graphql-response+json
  74. +
  75. 0282 MUST use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/graphql-response+json
  76. +
  77. 0283 MUST use 4xx or 5xx status codes on array {extensions} parameter when accepting application/graphql-response+json
  78. +
  79. 2330 SHOULD use 4xx status code on string {extensions} parameter when accepting application/graphql-response+json
  80. +
  81. 2331 SHOULD use 4xx status code on number {extensions} parameter when accepting application/graphql-response+json
  82. +
  83. 2332 SHOULD use 4xx status code on boolean {extensions} parameter when accepting application/graphql-response+json
  84. +
  85. 2333 SHOULD use 4xx status code on array {extensions} parameter when accepting application/graphql-response+json
  86. +
  87. 58B0 SHOULD use 4xx or 5xx status codes on string {extensions} parameter when accepting application/json
  88. +
  89. 58B1 SHOULD use 4xx or 5xx status codes on number {extensions} parameter when accepting application/json
  90. +
  91. 58B2 SHOULD use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/json
  92. +
  93. 58B3 SHOULD use 4xx or 5xx status codes on array {extensions} parameter when accepting application/json
  94. +
  95. 428F MUST allow map {extensions} parameter when accepting application/graphql-response+json
  96. 1B7A MUST allow map {extensions} parameter when accepting application/json
  97. 8764 MAY use 4xx or 5xx status codes if parameters are invalid
  98. 3E3A MAY use 400 status code if parameters are invalid
  99. 572B SHOULD use 200 status code on document parsing failure when accepting application/json
  100. FDE2 SHOULD use 200 status code on document validation failure when accepting application/json
  101. 7B9B SHOULD use a status code of 200 on variable coercion failure when accepting application/json
  102. -
  103. 865D SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
  104. +
  105. 865D MUST use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
  106. 556A SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json
  107. D586 SHOULD not contain the data entry on document parsing failure when accepting application/graphql-response+json
  108. -
  109. 51FE SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
  110. +
  111. 51FE MUST use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
  112. 74FF SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json
  113. 5E5B SHOULD not contain the data entry on document validation failure when accepting application/graphql-response+json
  114. 86EE SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json
  115. diff --git a/implementations/graph-client/report.json b/implementations/graph-client/report.json index 17ae4227..ab91c153 100644 --- a/implementations/graph-client/report.json +++ b/implementations/graph-client/report.json @@ -1,6 +1,6 @@ { - "total": 60, - "ok": 57, + "total": 68, + "ok": 65, "notice": 3, "warn": 0, "error": 0 diff --git a/implementations/graphql-helix/README.md b/implementations/graphql-helix/README.md index 72631835..716b5420 100644 --- a/implementations/graphql-helix/README.md +++ b/implementations/graphql-helix/README.md @@ -3,17 +3,18 @@

    GraphQL over HTTP audit report

    Passing

    1. 4655 MUST accept application/json and match the content-type
    2. -
    3. 47DE SHOULD accept */* and use application/json for the content-type
    4. -
    5. 80D8 SHOULD assume application/json content-type when accept is missing
    6. +
    7. 47DE SHOULD accept */* and use application/graphql-response+json or application/json for the content-type
    8. +
    9. 80D8 SHOULD assume application/json or application/graphql-response+json content-type when accept is missing
    10. 82A3 MUST use utf-8 encoding when responding
    11. BF61 MUST accept utf-8 encoded request
    12. 78D5 MUST assume utf-8 in request if encoding is unspecified
    13. @@ -28,35 +29,35 @@
    14. LKJ1 MAY use 400 status code on number {query} parameter
    15. LKJ2 MAY use 400 status code on boolean {query} parameter
    16. LKJ3 MAY use 400 status code on array {query} parameter
    17. -
    18. 34A2 SHOULD allow string {query} parameter when accepting application/graphql-response+json
    19. +
    20. 34A2 MUST allow string {query} parameter when accepting application/graphql-response+json
    21. 13EE MUST allow string {query} parameter when accepting application/json
    22. 6C00 MAY use 400 status code on object {operationName} parameter
    23. 6C01 MAY use 400 status code on number {operationName} parameter
    24. 6C02 MAY use 400 status code on boolean {operationName} parameter
    25. 6C03 MAY use 400 status code on array {operationName} parameter
    26. -
    27. 8161 SHOULD allow string {operationName} parameter when accepting application/graphql-response+json
    28. +
    29. 8161 MUST allow string {operationName} parameter when accepting application/graphql-response+json
    30. B8B3 MUST allow string {operationName} parameter when accepting application/json
    31. -
    32. 94B0 SHOULD allow null {variables} parameter when accepting application/graphql-response+json
    33. +
    34. 94B0 MUST allow null {variables} parameter when accepting application/graphql-response+json
    35. 0220 MUST allow null {variables} parameter when accepting application/json
    36. -
    37. 94B1 SHOULD allow null {operationName} parameter when accepting application/graphql-response+json
    38. +
    39. 94B1 MUST allow null {operationName} parameter when accepting application/graphql-response+json
    40. 0221 MUST allow null {operationName} parameter when accepting application/json
    41. -
    42. 94B2 SHOULD allow null {extensions} parameter when accepting application/graphql-response+json
    43. +
    44. 94B2 MUST allow null {extensions} parameter when accepting application/graphql-response+json
    45. 0222 MUST allow null {extensions} parameter when accepting application/json
    46. 4760 MAY use 400 status code on string {variables} parameter
    47. -
    48. 2EA1 SHOULD allow map {variables} parameter when accepting application/graphql-response+json
    49. +
    50. 2EA1 MUST allow map {variables} parameter when accepting application/graphql-response+json
    51. 28B9 MUST allow map {variables} parameter when accepting application/json
    52. D6D5 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/graphql-response+json
    53. 6A70 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/json
    54. -
    55. 428F SHOULD allow map {extensions} parameter when accepting application/graphql-response+json
    56. +
    57. 428F MUST allow map {extensions} parameter when accepting application/graphql-response+json
    58. 1B7A MUST allow map {extensions} parameter when accepting application/json
    59. B6DC MAY use 4xx or 5xx status codes on JSON parsing failure
    60. BCF8 MAY use 400 status code on JSON parsing failure
    61. 8764 MAY use 4xx or 5xx status codes if parameters are invalid
    62. 3E3A MAY use 400 status code if parameters are invalid
    63. -
    64. 865D SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
    65. +
    66. 865D MUST use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
    67. 556A SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json
    68. D586 SHOULD not contain the data entry on document parsing failure when accepting application/graphql-response+json
    69. -
    70. 51FE SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
    71. +
    72. 51FE MUST use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
    73. 74FF SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json
    74. 5E5B SHOULD not contain the data entry on document validation failure when accepting application/graphql-response+json
    75. 86EE SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json
    76. @@ -134,9 +135,14 @@ The server MAY support these, but are truly optional. These are suggestio
      -
    77. 58B0 MAY use 400 status code on string {extensions} parameter +
    + +

    Warnings

    +The server SHOULD support these, but is not required. +
      +
    1. 2330 SHOULD use 4xx status code on string {extensions} parameter when accepting application/graphql-response+json
      -Response status code is not 400 +Response status is not between 400 and 499
      {
         "statusText": "OK",
         "status": 200,
      @@ -157,9 +163,9 @@ The server MAY support these, but are truly optional. These are suggestio
       
    2. -
    3. 58B1 MAY use 400 status code on number {extensions} parameter +
    4. 2331 SHOULD use 4xx status code on number {extensions} parameter when accepting application/graphql-response+json
      -Response status code is not 400 +Response status is not between 400 and 499
      {
         "statusText": "OK",
         "status": 200,
      @@ -180,9 +186,9 @@ The server MAY support these, but are truly optional. These are suggestio
       
    5. -
    6. 58B2 MAY use 400 status code on boolean {extensions} parameter +
    7. 2332 SHOULD use 4xx status code on boolean {extensions} parameter when accepting application/graphql-response+json
      -Response status code is not 400 +Response status is not between 400 and 499
      {
         "statusText": "OK",
         "status": 200,
      @@ -203,9 +209,9 @@ The server MAY support these, but are truly optional. These are suggestio
       
    8. -
    9. 58B3 MAY use 400 status code on array {extensions} parameter +
    10. 2333 SHOULD use 4xx status code on array {extensions} parameter when accepting application/graphql-response+json
      -Response status code is not 400 +Response status is not between 400 and 499
      {
         "statusText": "OK",
         "status": 200,
      @@ -226,14 +232,78 @@ The server MAY support these, but are truly optional. These are suggestio
       
    11. -
    - -

    Warnings

    -The server SHOULD support these, but is not required. -
      -
    1. 22EB SHOULD accept application/graphql-response+json and match the content-type +
    2. 58B0 SHOULD use 4xx or 5xx status codes on string {extensions} parameter when accepting application/json
      -Response header content-type does not contain application/graphql-response+json +Response status is not between 400 and 599 +
      {
      +  "statusText": "OK",
      +  "status": 200,
      +  "headers": {
      +    "x-powered-by": "Express",
      +    "keep-alive": "timeout=5",
      +    "date": "",
      +    "content-type": "application/json",
      +    "content-length": "31",
      +    "connection": "keep-alive"
      +  },
      +  "body": {
      +    "data": {
      +      "__typename": "Query"
      +    }
      +  }
      +}
      +
      +
      +
    3. +
    4. 58B1 SHOULD use 4xx or 5xx status codes on number {extensions} parameter when accepting application/json +
      +Response status is not between 400 and 599 +
      {
      +  "statusText": "OK",
      +  "status": 200,
      +  "headers": {
      +    "x-powered-by": "Express",
      +    "keep-alive": "timeout=5",
      +    "date": "",
      +    "content-type": "application/json",
      +    "content-length": "31",
      +    "connection": "keep-alive"
      +  },
      +  "body": {
      +    "data": {
      +      "__typename": "Query"
      +    }
      +  }
      +}
      +
      +
      +
    5. +
    6. 58B2 SHOULD use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/json +
      +Response status is not between 400 and 599 +
      {
      +  "statusText": "OK",
      +  "status": 200,
      +  "headers": {
      +    "x-powered-by": "Express",
      +    "keep-alive": "timeout=5",
      +    "date": "",
      +    "content-type": "application/json",
      +    "content-length": "31",
      +    "connection": "keep-alive"
      +  },
      +  "body": {
      +    "data": {
      +      "__typename": "Query"
      +    }
      +  }
      +}
      +
      +
      +
    7. +
    8. 58B3 SHOULD use 4xx or 5xx status codes on array {extensions} parameter when accepting application/json +
      +Response status is not between 400 and 599
      {
         "statusText": "OK",
         "status": 200,
      @@ -358,3 +428,122 @@ The server SHOULD support these, but is not required.
       
    +

    Errors

    +The server MUST support these. +
      +
    1. 22EB MUST 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": {
      +    "x-powered-by": "Express",
      +    "keep-alive": "timeout=5",
      +    "date": "",
      +    "content-type": "application/json",
      +    "content-length": "31",
      +    "connection": "keep-alive"
      +  },
      +  "body": {
      +    "data": {
      +      "__typename": "Query"
      +    }
      +  }
      +}
      +
      +
      +
    2. +
    3. 0280 MUST use 4xx or 5xx status codes on string {extensions} parameter when accepting application/graphql-response+json +
      +Response status is not between 400 and 599 +
      {
      +  "statusText": "OK",
      +  "status": 200,
      +  "headers": {
      +    "x-powered-by": "Express",
      +    "keep-alive": "timeout=5",
      +    "date": "",
      +    "content-type": "application/json",
      +    "content-length": "31",
      +    "connection": "keep-alive"
      +  },
      +  "body": {
      +    "data": {
      +      "__typename": "Query"
      +    }
      +  }
      +}
      +
      +
      +
    4. +
    5. 0281 MUST use 4xx or 5xx status codes on number {extensions} parameter when accepting application/graphql-response+json +
      +Response status is not between 400 and 599 +
      {
      +  "statusText": "OK",
      +  "status": 200,
      +  "headers": {
      +    "x-powered-by": "Express",
      +    "keep-alive": "timeout=5",
      +    "date": "",
      +    "content-type": "application/json",
      +    "content-length": "31",
      +    "connection": "keep-alive"
      +  },
      +  "body": {
      +    "data": {
      +      "__typename": "Query"
      +    }
      +  }
      +}
      +
      +
      +
    6. +
    7. 0282 MUST use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/graphql-response+json +
      +Response status is not between 400 and 599 +
      {
      +  "statusText": "OK",
      +  "status": 200,
      +  "headers": {
      +    "x-powered-by": "Express",
      +    "keep-alive": "timeout=5",
      +    "date": "",
      +    "content-type": "application/json",
      +    "content-length": "31",
      +    "connection": "keep-alive"
      +  },
      +  "body": {
      +    "data": {
      +      "__typename": "Query"
      +    }
      +  }
      +}
      +
      +
      +
    8. +
    9. 0283 MUST use 4xx or 5xx status codes on array {extensions} parameter when accepting application/graphql-response+json +
      +Response status is not between 400 and 599 +
      {
      +  "statusText": "OK",
      +  "status": 200,
      +  "headers": {
      +    "x-powered-by": "Express",
      +    "keep-alive": "timeout=5",
      +    "date": "",
      +    "content-type": "application/json",
      +    "content-length": "31",
      +    "connection": "keep-alive"
      +  },
      +  "body": {
      +    "data": {
      +      "__typename": "Query"
      +    }
      +  }
      +}
      +
      +
      +
    10. +
    diff --git a/implementations/graphql-helix/report.json b/implementations/graphql-helix/report.json index a7e67865..36eb9d6f 100644 --- a/implementations/graphql-helix/report.json +++ b/implementations/graphql-helix/report.json @@ -1,7 +1,7 @@ { - "total": 60, + "total": 68, "ok": 49, - "notice": 7, - "warn": 4, - "error": 0 + "notice": 3, + "warn": 11, + "error": 5 } diff --git a/implementations/graphql-yoga/README.md b/implementations/graphql-yoga/README.md index 9c15aea4..3053b1fd 100644 --- a/implementations/graphql-yoga/README.md +++ b/implementations/graphql-yoga/README.md @@ -3,16 +3,16 @@

    GraphQL over HTTP audit report

    Passing

      -
    1. 22EB SHOULD accept application/graphql-response+json and match the content-type
    2. +
    3. 22EB MUST accept application/graphql-response+json and match the content-type
    4. 4655 MUST accept application/json and match the content-type
    5. -
    6. 47DE SHOULD accept */* and use application/json for the content-type
    7. -
    8. 80D8 SHOULD assume application/json content-type when accept is missing
    9. +
    10. 47DE SHOULD accept */* and use application/graphql-response+json or application/json for the content-type
    11. +
    12. 80D8 SHOULD assume application/json or application/graphql-response+json content-type when accept is missing
    13. 82A3 MUST use utf-8 encoding when responding
    14. BF61 MUST accept utf-8 encoded request
    15. 78D5 MUST assume utf-8 in request if encoding is unspecified
    16. @@ -27,33 +27,41 @@
    17. LKJ1 MAY use 400 status code on number {query} parameter
    18. LKJ2 MAY use 400 status code on boolean {query} parameter
    19. LKJ3 MAY use 400 status code on array {query} parameter
    20. -
    21. 34A2 SHOULD allow string {query} parameter when accepting application/graphql-response+json
    22. +
    23. 34A2 MUST allow string {query} parameter when accepting application/graphql-response+json
    24. 13EE MUST allow string {query} parameter when accepting application/json
    25. 6C00 MAY use 400 status code on object {operationName} parameter
    26. 6C01 MAY use 400 status code on number {operationName} parameter
    27. 6C02 MAY use 400 status code on boolean {operationName} parameter
    28. 6C03 MAY use 400 status code on array {operationName} parameter
    29. -
    30. 8161 SHOULD allow string {operationName} parameter when accepting application/graphql-response+json
    31. +
    32. 8161 MUST allow string {operationName} parameter when accepting application/graphql-response+json
    33. B8B3 MUST allow string {operationName} parameter when accepting application/json
    34. -
    35. 94B0 SHOULD allow null {variables} parameter when accepting application/graphql-response+json
    36. +
    37. 94B0 MUST allow null {variables} parameter when accepting application/graphql-response+json
    38. 0220 MUST allow null {variables} parameter when accepting application/json
    39. -
    40. 94B1 SHOULD allow null {operationName} parameter when accepting application/graphql-response+json
    41. +
    42. 94B1 MUST allow null {operationName} parameter when accepting application/graphql-response+json
    43. 0221 MUST allow null {operationName} parameter when accepting application/json
    44. -
    45. 94B2 SHOULD allow null {extensions} parameter when accepting application/graphql-response+json
    46. +
    47. 94B2 MUST allow null {extensions} parameter when accepting application/graphql-response+json
    48. 0222 MUST allow null {extensions} parameter when accepting application/json
    49. 4760 MAY use 400 status code on string {variables} parameter
    50. 4761 MAY use 400 status code on number {variables} parameter
    51. 4762 MAY use 400 status code on boolean {variables} parameter
    52. 4763 MAY use 400 status code on array {variables} parameter
    53. -
    54. 2EA1 SHOULD allow map {variables} parameter when accepting application/graphql-response+json
    55. +
    56. 2EA1 MUST allow map {variables} parameter when accepting application/graphql-response+json
    57. 28B9 MUST allow map {variables} parameter when accepting application/json
    58. D6D5 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/graphql-response+json
    59. 6A70 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/json
    60. -
    61. 58B0 MAY use 400 status code on string {extensions} parameter
    62. -
    63. 58B1 MAY use 400 status code on number {extensions} parameter
    64. -
    65. 58B2 MAY use 400 status code on boolean {extensions} parameter
    66. -
    67. 58B3 MAY use 400 status code on array {extensions} parameter
    68. -
    69. 428F SHOULD allow map {extensions} parameter when accepting application/graphql-response+json
    70. +
    71. 0280 MUST use 4xx or 5xx status codes on string {extensions} parameter when accepting application/graphql-response+json
    72. +
    73. 0281 MUST use 4xx or 5xx status codes on number {extensions} parameter when accepting application/graphql-response+json
    74. +
    75. 0282 MUST use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/graphql-response+json
    76. +
    77. 0283 MUST use 4xx or 5xx status codes on array {extensions} parameter when accepting application/graphql-response+json
    78. +
    79. 2330 SHOULD use 4xx status code on string {extensions} parameter when accepting application/graphql-response+json
    80. +
    81. 2331 SHOULD use 4xx status code on number {extensions} parameter when accepting application/graphql-response+json
    82. +
    83. 2332 SHOULD use 4xx status code on boolean {extensions} parameter when accepting application/graphql-response+json
    84. +
    85. 2333 SHOULD use 4xx status code on array {extensions} parameter when accepting application/graphql-response+json
    86. +
    87. 58B0 SHOULD use 4xx or 5xx status codes on string {extensions} parameter when accepting application/json
    88. +
    89. 58B1 SHOULD use 4xx or 5xx status codes on number {extensions} parameter when accepting application/json
    90. +
    91. 58B2 SHOULD use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/json
    92. +
    93. 58B3 SHOULD use 4xx or 5xx status codes on array {extensions} parameter when accepting application/json
    94. +
    95. 428F MUST allow map {extensions} parameter when accepting application/graphql-response+json
    96. 1B7A MUST allow map {extensions} parameter when accepting application/json
    97. B6DC MAY use 4xx or 5xx status codes on JSON parsing failure
    98. BCF8 MAY use 400 status code on JSON parsing failure
    99. @@ -62,10 +70,10 @@
    100. 572B SHOULD use 200 status code on document parsing failure when accepting application/json
    101. FDE2 SHOULD use 200 status code on document validation failure when accepting application/json
    102. 7B9B SHOULD use a status code of 200 on variable coercion failure when accepting application/json
    103. -
    104. 865D SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
    105. +
    106. 865D MUST use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
    107. 556A SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json
    108. D586 SHOULD not contain the data entry on document parsing failure when accepting application/graphql-response+json
    109. -
    110. 51FE SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
    111. +
    112. 51FE MUST use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
    113. 74FF SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json
    114. 5E5B SHOULD not contain the data entry on document validation failure when accepting application/graphql-response+json
    115. 86EE SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json
    116. diff --git a/implementations/graphql-yoga/report.json b/implementations/graphql-yoga/report.json index d19c440b..562cbede 100644 --- a/implementations/graphql-yoga/report.json +++ b/implementations/graphql-yoga/report.json @@ -1,6 +1,6 @@ { - "total": 60, - "ok": 60, + "total": 68, + "ok": 68, "notice": 0, "warn": 0, "error": 0 diff --git a/implementations/hotchocolate/README.md b/implementations/hotchocolate/README.md index cb066ff6..cafaf0bd 100644 --- a/implementations/hotchocolate/README.md +++ b/implementations/hotchocolate/README.md @@ -3,15 +3,17 @@

      GraphQL over HTTP audit report

        -
      • 60 audits in total
      • -
      • 58 pass
      • -
      • ❗️ 2 warnings (optional)
      • +
      • 68 audits in total
      • +
      • 64 pass
      • +
      • ❗️ 4 warnings (optional)

      Passing

        -
      1. 22EB SHOULD accept application/graphql-response+json and match the content-type
      2. +
      3. 22EB MUST accept application/graphql-response+json and match the content-type
      4. 4655 MUST accept application/json and match the content-type
      5. +
      6. 47DE SHOULD accept */* and use application/graphql-response+json or application/json for the content-type
      7. +
      8. 80D8 SHOULD assume application/json or application/graphql-response+json content-type when accept is missing
      9. 82A3 MUST use utf-8 encoding when responding
      10. BF61 MUST accept utf-8 encoded request
      11. 78D5 MUST assume utf-8 in request if encoding is unspecified
      12. @@ -26,33 +28,37 @@
      13. LKJ1 MAY use 400 status code on number {query} parameter
      14. LKJ2 MAY use 400 status code on boolean {query} parameter
      15. LKJ3 MAY use 400 status code on array {query} parameter
      16. -
      17. 34A2 SHOULD allow string {query} parameter when accepting application/graphql-response+json
      18. +
      19. 34A2 MUST allow string {query} parameter when accepting application/graphql-response+json
      20. 13EE MUST allow string {query} parameter when accepting application/json
      21. 6C00 MAY use 400 status code on object {operationName} parameter
      22. 6C01 MAY use 400 status code on number {operationName} parameter
      23. 6C02 MAY use 400 status code on boolean {operationName} parameter
      24. 6C03 MAY use 400 status code on array {operationName} parameter
      25. -
      26. 8161 SHOULD allow string {operationName} parameter when accepting application/graphql-response+json
      27. +
      28. 8161 MUST allow string {operationName} parameter when accepting application/graphql-response+json
      29. B8B3 MUST allow string {operationName} parameter when accepting application/json
      30. -
      31. 94B0 SHOULD allow null {variables} parameter when accepting application/graphql-response+json
      32. +
      33. 94B0 MUST allow null {variables} parameter when accepting application/graphql-response+json
      34. 0220 MUST allow null {variables} parameter when accepting application/json
      35. -
      36. 94B1 SHOULD allow null {operationName} parameter when accepting application/graphql-response+json
      37. +
      38. 94B1 MUST allow null {operationName} parameter when accepting application/graphql-response+json
      39. 0221 MUST allow null {operationName} parameter when accepting application/json
      40. -
      41. 94B2 SHOULD allow null {extensions} parameter when accepting application/graphql-response+json
      42. +
      43. 94B2 MUST allow null {extensions} parameter when accepting application/graphql-response+json
      44. 0222 MUST allow null {extensions} parameter when accepting application/json
      45. 4760 MAY use 400 status code on string {variables} parameter
      46. 4761 MAY use 400 status code on number {variables} parameter
      47. 4762 MAY use 400 status code on boolean {variables} parameter
      48. 4763 MAY use 400 status code on array {variables} parameter
      49. -
      50. 2EA1 SHOULD allow map {variables} parameter when accepting application/graphql-response+json
      51. +
      52. 2EA1 MUST allow map {variables} parameter when accepting application/graphql-response+json
      53. 28B9 MUST allow map {variables} parameter when accepting application/json
      54. D6D5 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/graphql-response+json
      55. 6A70 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/json
      56. -
      57. 58B0 MAY use 400 status code on string {extensions} parameter
      58. -
      59. 58B1 MAY use 400 status code on number {extensions} parameter
      60. -
      61. 58B2 MAY use 400 status code on boolean {extensions} parameter
      62. -
      63. 58B3 MAY use 400 status code on array {extensions} parameter
      64. -
      65. 428F SHOULD allow map {extensions} parameter when accepting application/graphql-response+json
      66. +
      67. 0280 MUST use 4xx or 5xx status codes on string {extensions} parameter when accepting application/graphql-response+json
      68. +
      69. 0281 MUST use 4xx or 5xx status codes on number {extensions} parameter when accepting application/graphql-response+json
      70. +
      71. 0282 MUST use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/graphql-response+json
      72. +
      73. 0283 MUST use 4xx or 5xx status codes on array {extensions} parameter when accepting application/graphql-response+json
      74. +
      75. 2330 SHOULD use 4xx status code on string {extensions} parameter when accepting application/graphql-response+json
      76. +
      77. 2331 SHOULD use 4xx status code on number {extensions} parameter when accepting application/graphql-response+json
      78. +
      79. 2332 SHOULD use 4xx status code on boolean {extensions} parameter when accepting application/graphql-response+json
      80. +
      81. 2333 SHOULD use 4xx status code on array {extensions} parameter when accepting application/graphql-response+json
      82. +
      83. 428F MUST allow map {extensions} parameter when accepting application/graphql-response+json
      84. 1B7A MUST allow map {extensions} parameter when accepting application/json
      85. B6DC MAY use 4xx or 5xx status codes on JSON parsing failure
      86. BCF8 MAY use 400 status code on JSON parsing failure
      87. @@ -61,10 +67,10 @@
      88. 572B SHOULD use 200 status code on document parsing failure when accepting application/json
      89. FDE2 SHOULD use 200 status code on document validation failure when accepting application/json
      90. 7B9B SHOULD use a status code of 200 on variable coercion failure when accepting application/json
      91. -
      92. 865D SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
      93. +
      94. 865D MUST use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
      95. 556A SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json
      96. D586 SHOULD not contain the data entry on document parsing failure when accepting application/graphql-response+json
      97. -
      98. 51FE SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
      99. +
      100. 51FE MUST use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
      101. 74FF SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json
      102. 5E5B SHOULD not contain the data entry on document validation failure when accepting application/graphql-response+json
      103. 86EE SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json
      104. @@ -73,9 +79,9 @@

        Warnings

        The server SHOULD support these, but is not required.
          -
        1. 47DE SHOULD accept */* and use application/json for the content-type +
        2. 58B0 SHOULD use 4xx or 5xx status codes on string {extensions} parameter when accepting application/json
          -Response header content-type does not contain application/json +Response status is not between 400 and 599
          {
             "statusText": "OK",
             "status": 200,
          @@ -83,20 +89,31 @@ The server SHOULD support these, but is not required.
               "transfer-encoding": "chunked",
               "server": "Kestrel",
               "date": "",
          -    "content-type": "application/graphql-response+json;charset=utf-8"
          +    "content-type": "application/json; charset=utf-8"
             },
             "body": {
          -    "data": {
          -      "__typename": "Query"
          -    }
          +    "errors": [
          +      {
          +        "message": "Expected an object or a null-token, but found a String-token with value `string`.",
          +        "locations": [
          +          {
          +            "line": 1,
          +            "column": 40
          +          }
          +        ],
          +        "extensions": {
          +          "code": "HC0011"
          +        }
          +      }
          +    ]
             }
           }
           
        3. -
        4. 80D8 SHOULD assume application/json content-type when accept is missing +
        5. 58B1 SHOULD use 4xx or 5xx status codes on number {extensions} parameter when accepting application/json
          -Response header content-type does not contain application/json +Response status is not between 400 and 599
          {
             "statusText": "OK",
             "status": 200,
          @@ -104,12 +121,87 @@ The server SHOULD support these, but is not required.
               "transfer-encoding": "chunked",
               "server": "Kestrel",
               "date": "",
          -    "content-type": "application/graphql-response+json;charset=utf-8"
          +    "content-type": "application/json; charset=utf-8"
             },
             "body": {
          -    "data": {
          -      "__typename": "Query"
          -    }
          +    "errors": [
          +      {
          +        "message": "Expected an object or a null-token, but found a Integer-token with value `0`.",
          +        "locations": [
          +          {
          +            "line": 1,
          +            "column": 40
          +          }
          +        ],
          +        "extensions": {
          +          "code": "HC0011"
          +        }
          +      }
          +    ]
          +  }
          +}
          +
          +
          +
        6. +
        7. 58B2 SHOULD use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/json +
          +Response status is not between 400 and 599 +
          {
          +  "statusText": "OK",
          +  "status": 200,
          +  "headers": {
          +    "transfer-encoding": "chunked",
          +    "server": "Kestrel",
          +    "date": "",
          +    "content-type": "application/json; charset=utf-8"
          +  },
          +  "body": {
          +    "errors": [
          +      {
          +        "message": "Expected an object or a null-token, but found a Name-token with value `false`.",
          +        "locations": [
          +          {
          +            "line": 1,
          +            "column": 40
          +          }
          +        ],
          +        "extensions": {
          +          "code": "HC0011"
          +        }
          +      }
          +    ]
          +  }
          +}
          +
          +
          +
        8. +
        9. 58B3 SHOULD use 4xx or 5xx status codes on array {extensions} parameter when accepting application/json +
          +Response status is not between 400 and 599 +
          {
          +  "statusText": "OK",
          +  "status": 200,
          +  "headers": {
          +    "transfer-encoding": "chunked",
          +    "server": "Kestrel",
          +    "date": "",
          +    "content-type": "application/json; charset=utf-8"
          +  },
          +  "body": {
          +    "errors": [
          +      {
          +        "message": "Expected an object or a null-token, but found a LeftBracket-token with value ``.",
          +        "locations": [
          +          {
          +            "line": 1,
          +            "column": 40
          +          }
          +        ],
          +        "extensions": {
          +          "code": "HC0011"
          +        }
          +      }
          +    ]
             }
           }
           
          diff --git a/implementations/hotchocolate/report.json b/implementations/hotchocolate/report.json index ddfc3f4e..fd5d4049 100644 --- a/implementations/hotchocolate/report.json +++ b/implementations/hotchocolate/report.json @@ -1,7 +1,7 @@ { - "total": 60, - "ok": 58, + "total": 68, + "ok": 64, "notice": 0, - "warn": 2, + "warn": 4, "error": 0 } diff --git a/implementations/lighthouse/README.md b/implementations/lighthouse/README.md index 49f21d60..07b1f953 100644 --- a/implementations/lighthouse/README.md +++ b/implementations/lighthouse/README.md @@ -3,17 +3,18 @@

          GraphQL over HTTP audit report

            -
          • 60 audits in total
          • +
          • 68 audits in total
          • 33 pass
          • -
          • 💡 21 notices (suggestions)
          • -
          • ❗️ 6 warnings (optional)
          • +
          • 💡 17 notices (suggestions)
          • +
          • ❗️ 11 warnings (optional)
          • +
          • 7 errors (required)

          Passing

          1. 4655 MUST accept application/json and match the content-type
          2. -
          3. 47DE SHOULD accept */* and use application/json for the content-type
          4. -
          5. 80D8 SHOULD assume application/json content-type when accept is missing
          6. +
          7. 47DE SHOULD accept */* and use application/graphql-response+json or application/json for the content-type
          8. +
          9. 80D8 SHOULD assume application/json or application/graphql-response+json content-type when accept is missing
          10. 82A3 MUST use utf-8 encoding when responding
          11. BF61 MUST accept utf-8 encoded request
          12. 78D5 MUST assume utf-8 in request if encoding is unspecified
          13. @@ -21,21 +22,21 @@
          14. 5A70 MAY accept application/x-www-form-urlencoded formatted GET requests
          15. 03D4 MUST accept application/json POST requests
          16. A5BF MAY use 400 status code when request body is missing on POST
          17. -
          18. 34A2 SHOULD allow string {query} parameter when accepting application/graphql-response+json
          19. +
          20. 34A2 MUST allow string {query} parameter when accepting application/graphql-response+json
          21. 13EE MUST allow string {query} parameter when accepting application/json
          22. -
          23. 8161 SHOULD allow string {operationName} parameter when accepting application/graphql-response+json
          24. +
          25. 8161 MUST allow string {operationName} parameter when accepting application/graphql-response+json
          26. B8B3 MUST allow string {operationName} parameter when accepting application/json
          27. -
          28. 94B0 SHOULD allow null {variables} parameter when accepting application/graphql-response+json
          29. +
          30. 94B0 MUST allow null {variables} parameter when accepting application/graphql-response+json
          31. 0220 MUST allow null {variables} parameter when accepting application/json
          32. -
          33. 94B1 SHOULD allow null {operationName} parameter when accepting application/graphql-response+json
          34. +
          35. 94B1 MUST allow null {operationName} parameter when accepting application/graphql-response+json
          36. 0221 MUST allow null {operationName} parameter when accepting application/json
          37. -
          38. 94B2 SHOULD allow null {extensions} parameter when accepting application/graphql-response+json
          39. +
          40. 94B2 MUST allow null {extensions} parameter when accepting application/graphql-response+json
          41. 0222 MUST allow null {extensions} parameter when accepting application/json
          42. -
          43. 2EA1 SHOULD allow map {variables} parameter when accepting application/graphql-response+json
          44. +
          45. 2EA1 MUST allow map {variables} parameter when accepting application/graphql-response+json
          46. 28B9 MUST allow map {variables} parameter when accepting application/json
          47. D6D5 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/graphql-response+json
          48. 6A70 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/json
          49. -
          50. 428F SHOULD allow map {extensions} parameter when accepting application/graphql-response+json
          51. +
          52. 428F MUST allow map {extensions} parameter when accepting application/graphql-response+json
          53. 1B7A MUST allow map {extensions} parameter when accepting application/json
          54. B6DC MAY use 4xx or 5xx status codes on JSON parsing failure
          55. BCF8 MAY use 400 status code on JSON parsing failure
          56. @@ -3591,98 +3592,6 @@ The server MAY support these, but are truly optional. These are suggestio
        10. -
        11. 58B0 MAY use 400 status code on string {extensions} parameter -
          -Response status code is not 400 -
          {
          -  "statusText": "OK",
          -  "status": 200,
          -  "headers": {
          -    "x-powered-by": "PHP/8.2.19",
          -    "host": "localhost:4000",
          -    "date": "",
          -    "content-type": "application/json",
          -    "connection": "close",
          -    "cache-control": "no-cache, private"
          -  },
          -  "body": {
          -    "data": {
          -      "__typename": "Query"
          -    }
          -  }
          -}
          -
          -
          -
        12. -
        13. 58B1 MAY use 400 status code on number {extensions} parameter -
          -Response status code is not 400 -
          {
          -  "statusText": "OK",
          -  "status": 200,
          -  "headers": {
          -    "x-powered-by": "PHP/8.2.19",
          -    "host": "localhost:4000",
          -    "date": "",
          -    "content-type": "application/json",
          -    "connection": "close",
          -    "cache-control": "no-cache, private"
          -  },
          -  "body": {
          -    "data": {
          -      "__typename": "Query"
          -    }
          -  }
          -}
          -
          -
          -
        14. -
        15. 58B2 MAY use 400 status code on boolean {extensions} parameter -
          -Response status code is not 400 -
          {
          -  "statusText": "OK",
          -  "status": 200,
          -  "headers": {
          -    "x-powered-by": "PHP/8.2.19",
          -    "host": "localhost:4000",
          -    "date": "",
          -    "content-type": "application/json",
          -    "connection": "close",
          -    "cache-control": "no-cache, private"
          -  },
          -  "body": {
          -    "data": {
          -      "__typename": "Query"
          -    }
          -  }
          -}
          -
          -
          -
        16. -
        17. 58B3 MAY use 400 status code on array {extensions} parameter -
          -Response status code is not 400 -
          {
          -  "statusText": "OK",
          -  "status": 200,
          -  "headers": {
          -    "x-powered-by": "PHP/8.2.19",
          -    "host": "localhost:4000",
          -    "date": "",
          -    "content-type": "application/json",
          -    "connection": "close",
          -    "cache-control": "no-cache, private"
          -  },
          -  "body": {
          -    "data": {
          -      "__typename": "Query"
          -    }
          -  }
          -}
          -
          -
          -
        18. 8764 MAY use 4xx or 5xx status codes if parameters are invalid
          Response status is not between 400 and 599 @@ -4180,9 +4089,147 @@ The server MAY support these, but are truly optional. These are suggestio

          Warnings

          The server SHOULD support these, but is not required.
            -
          1. 22EB SHOULD accept application/graphql-response+json and match the content-type +
          2. 2330 SHOULD use 4xx status code on string {extensions} parameter when accepting application/graphql-response+json
            -Response header content-type does not contain application/graphql-response+json +Response status is not between 400 and 499 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "x-powered-by": "PHP/8.2.19",
            +    "host": "localhost:4000",
            +    "date": "",
            +    "content-type": "application/json",
            +    "connection": "close",
            +    "cache-control": "no-cache, private"
            +  },
            +  "body": {
            +    "data": {
            +      "__typename": "Query"
            +    }
            +  }
            +}
            +
            +
            +
          3. +
          4. 2331 SHOULD use 4xx status code on number {extensions} parameter when accepting application/graphql-response+json +
            +Response status is not between 400 and 499 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "x-powered-by": "PHP/8.2.19",
            +    "host": "localhost:4000",
            +    "date": "",
            +    "content-type": "application/json",
            +    "connection": "close",
            +    "cache-control": "no-cache, private"
            +  },
            +  "body": {
            +    "data": {
            +      "__typename": "Query"
            +    }
            +  }
            +}
            +
            +
            +
          5. +
          6. 2332 SHOULD use 4xx status code on boolean {extensions} parameter when accepting application/graphql-response+json +
            +Response status is not between 400 and 499 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "x-powered-by": "PHP/8.2.19",
            +    "host": "localhost:4000",
            +    "date": "",
            +    "content-type": "application/json",
            +    "connection": "close",
            +    "cache-control": "no-cache, private"
            +  },
            +  "body": {
            +    "data": {
            +      "__typename": "Query"
            +    }
            +  }
            +}
            +
            +
            +
          7. +
          8. 2333 SHOULD use 4xx status code on array {extensions} parameter when accepting application/graphql-response+json +
            +Response status is not between 400 and 499 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "x-powered-by": "PHP/8.2.19",
            +    "host": "localhost:4000",
            +    "date": "",
            +    "content-type": "application/json",
            +    "connection": "close",
            +    "cache-control": "no-cache, private"
            +  },
            +  "body": {
            +    "data": {
            +      "__typename": "Query"
            +    }
            +  }
            +}
            +
            +
            +
          9. +
          10. 58B0 SHOULD use 4xx or 5xx status codes on string {extensions} parameter when accepting application/json +
            +Response status is not between 400 and 599 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "x-powered-by": "PHP/8.2.19",
            +    "host": "localhost:4000",
            +    "date": "",
            +    "content-type": "application/json",
            +    "connection": "close",
            +    "cache-control": "no-cache, private"
            +  },
            +  "body": {
            +    "data": {
            +      "__typename": "Query"
            +    }
            +  }
            +}
            +
            +
            +
          11. +
          12. 58B1 SHOULD use 4xx or 5xx status codes on number {extensions} parameter when accepting application/json +
            +Response status is not between 400 and 599 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "x-powered-by": "PHP/8.2.19",
            +    "host": "localhost:4000",
            +    "date": "",
            +    "content-type": "application/json",
            +    "connection": "close",
            +    "cache-control": "no-cache, private"
            +  },
            +  "body": {
            +    "data": {
            +      "__typename": "Query"
            +    }
            +  }
            +}
            +
            +
            +
          13. +
          14. 58B2 SHOULD use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/json +
            +Response status is not between 400 and 599
            {
               "statusText": "OK",
               "status": 200,
            @@ -4203,9 +4250,32 @@ The server SHOULD support these, but is not required.
             
          15. -
          16. 865D SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json +
          17. 58B3 SHOULD use 4xx or 5xx status codes on array {extensions} parameter when accepting application/json
            Response status is not between 400 and 599 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "x-powered-by": "PHP/8.2.19",
            +    "host": "localhost:4000",
            +    "date": "",
            +    "content-type": "application/json",
            +    "connection": "close",
            +    "cache-control": "no-cache, private"
            +  },
            +  "body": {
            +    "data": {
            +      "__typename": "Query"
            +    }
            +  }
            +}
            +
            +
            +
          18. +
          19. 556A SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json +
            +Response status code is not 400
            {
               "statusText": "OK",
               "status": 200,
            @@ -4238,7 +4308,7 @@ The server SHOULD support these, but is not required.
             
          20. -
          21. 556A SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json +
          22. 74FF SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json
            Response status code is not 400
            {
            @@ -4255,11 +4325,11 @@ The server SHOULD support these, but is not required.
               "body": {
                 "errors": [
                   {
            -        "message": "Syntax Error: Expected Name, found ",
            +        "message": "Syntax Error: Expected Name, found Int \"8\"",
                     "locations": [
                       {
                         "line": 1,
            -            "column": 2
            +            "column": 3
                       }
                     ],
                     "extensions": {
            @@ -4273,9 +4343,9 @@ The server SHOULD support these, but is not required.
             
          23. -
          24. 51FE SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json +
          25. 86EE SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json
            -Response status is not between 400 and 599 +Response status code is not 400
            {
               "statusText": "OK",
               "status": 200,
            @@ -4290,16 +4360,16 @@ The server SHOULD support these, but is not required.
               "body": {
                 "errors": [
                   {
            -        "message": "Syntax Error: Expected Name, found Int \"8\"",
            +        "message": "Variable \"$id\" is never used in operation \"CoerceFailure\".",
                     "locations": [
                       {
                         "line": 1,
            -            "column": 3
            +            "column": 21
                       }
                     ],
                     "extensions": {
            -          "line": 382,
            -          "file": "/app/vendor/webonyx/graphql-php/src/Language/Parser.php"
            +          "line": 41,
            +          "file": "/app/vendor/webonyx/graphql-php/src/Validator/Rules/NoUnusedVariables.php"
                     }
                   }
                 ]
            @@ -4308,9 +4378,129 @@ The server SHOULD support these, but is not required.
             
          26. -
          27. 74FF SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json +
          + +

          Errors

          +The server MUST support these. +
            +
          1. 22EB MUST accept application/graphql-response+json and match the content-type
            -Response status code is not 400 +Response header content-type does not contain application/graphql-response+json +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "x-powered-by": "PHP/8.2.19",
            +    "host": "localhost:4000",
            +    "date": "",
            +    "content-type": "application/json",
            +    "connection": "close",
            +    "cache-control": "no-cache, private"
            +  },
            +  "body": {
            +    "data": {
            +      "__typename": "Query"
            +    }
            +  }
            +}
            +
            +
            +
          2. +
          3. 0280 MUST use 4xx or 5xx status codes on string {extensions} parameter when accepting application/graphql-response+json +
            +Response status is not between 400 and 599 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "x-powered-by": "PHP/8.2.19",
            +    "host": "localhost:4000",
            +    "date": "",
            +    "content-type": "application/json",
            +    "connection": "close",
            +    "cache-control": "no-cache, private"
            +  },
            +  "body": {
            +    "data": {
            +      "__typename": "Query"
            +    }
            +  }
            +}
            +
            +
            +
          4. +
          5. 0281 MUST use 4xx or 5xx status codes on number {extensions} parameter when accepting application/graphql-response+json +
            +Response status is not between 400 and 599 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "x-powered-by": "PHP/8.2.19",
            +    "host": "localhost:4000",
            +    "date": "",
            +    "content-type": "application/json",
            +    "connection": "close",
            +    "cache-control": "no-cache, private"
            +  },
            +  "body": {
            +    "data": {
            +      "__typename": "Query"
            +    }
            +  }
            +}
            +
            +
            +
          6. +
          7. 0282 MUST use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/graphql-response+json +
            +Response status is not between 400 and 599 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "x-powered-by": "PHP/8.2.19",
            +    "host": "localhost:4000",
            +    "date": "",
            +    "content-type": "application/json",
            +    "connection": "close",
            +    "cache-control": "no-cache, private"
            +  },
            +  "body": {
            +    "data": {
            +      "__typename": "Query"
            +    }
            +  }
            +}
            +
            +
            +
          8. +
          9. 0283 MUST use 4xx or 5xx status codes on array {extensions} parameter when accepting application/graphql-response+json +
            +Response status is not between 400 and 599 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "x-powered-by": "PHP/8.2.19",
            +    "host": "localhost:4000",
            +    "date": "",
            +    "content-type": "application/json",
            +    "connection": "close",
            +    "cache-control": "no-cache, private"
            +  },
            +  "body": {
            +    "data": {
            +      "__typename": "Query"
            +    }
            +  }
            +}
            +
            +
            +
          10. +
          11. 865D MUST use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json +
            +Response status is not between 400 and 599
            {
               "statusText": "OK",
               "status": 200,
            @@ -4325,11 +4515,11 @@ The server SHOULD support these, but is not required.
               "body": {
                 "errors": [
                   {
            -        "message": "Syntax Error: Expected Name, found Int \"8\"",
            +        "message": "Syntax Error: Expected Name, found ",
                     "locations": [
                       {
                         "line": 1,
            -            "column": 3
            +            "column": 2
                       }
                     ],
                     "extensions": {
            @@ -4343,9 +4533,9 @@ The server SHOULD support these, but is not required.
             
          12. -
          13. 86EE SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json +
          14. 51FE MUST use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
            -Response status code is not 400 +Response status is not between 400 and 599
            {
               "statusText": "OK",
               "status": 200,
            @@ -4360,16 +4550,16 @@ The server SHOULD support these, but is not required.
               "body": {
                 "errors": [
                   {
            -        "message": "Variable \"$id\" is never used in operation \"CoerceFailure\".",
            +        "message": "Syntax Error: Expected Name, found Int \"8\"",
                     "locations": [
                       {
                         "line": 1,
            -            "column": 21
            +            "column": 3
                       }
                     ],
                     "extensions": {
            -          "line": 41,
            -          "file": "/app/vendor/webonyx/graphql-php/src/Validator/Rules/NoUnusedVariables.php"
            +          "line": 382,
            +          "file": "/app/vendor/webonyx/graphql-php/src/Language/Parser.php"
                     }
                   }
                 ]
            @@ -4379,4 +4569,3 @@ The server SHOULD support these, but is not required.
             
          - diff --git a/implementations/lighthouse/report.json b/implementations/lighthouse/report.json index 9c2ceb34..650ecfcb 100644 --- a/implementations/lighthouse/report.json +++ b/implementations/lighthouse/report.json @@ -1,7 +1,7 @@ { - "total": 60, + "total": 68, "ok": 33, - "notice": 21, - "warn": 6, - "error": 0 + "notice": 17, + "warn": 11, + "error": 7 } diff --git a/implementations/mercurius/README.md b/implementations/mercurius/README.md index 6f09dbb9..1064fe2d 100644 --- a/implementations/mercurius/README.md +++ b/implementations/mercurius/README.md @@ -3,18 +3,18 @@

          GraphQL over HTTP audit report

            -
          • 60 audits in total
          • -
          • 46 pass
          • +
          • 68 audits in total
          • +
          • 54 pass
          • 💡 6 notices (suggestions)
          • -
          • ❗️ 7 warnings (optional)
          • -
          • 1 errors (required)
          • +
          • ❗️ 5 warnings (optional)
          • +
          • 3 errors (required)

          Passing

          1. 4655 MUST accept application/json and match the content-type
          2. -
          3. 47DE SHOULD accept */* and use application/json for the content-type
          4. -
          5. 80D8 SHOULD assume application/json content-type when accept is missing
          6. +
          7. 47DE SHOULD accept */* and use application/graphql-response+json or application/json for the content-type
          8. +
          9. 80D8 SHOULD assume application/json or application/graphql-response+json content-type when accept is missing
          10. 82A3 MUST use utf-8 encoding when responding
          11. BF61 MUST accept utf-8 encoded request
          12. 78D5 MUST assume utf-8 in request if encoding is unspecified
          13. @@ -27,36 +27,44 @@
          14. 423L MAY use 400 status code on missing {query} parameter
          15. LKJ0 MAY use 400 status code on object {query} parameter
          16. LKJ3 MAY use 400 status code on array {query} parameter
          17. -
          18. 34A2 SHOULD allow string {query} parameter when accepting application/graphql-response+json
          19. +
          20. 34A2 MUST allow string {query} parameter when accepting application/graphql-response+json
          21. 13EE MUST allow string {query} parameter when accepting application/json
          22. 6C00 MAY use 400 status code on object {operationName} parameter
          23. 6C03 MAY use 400 status code on array {operationName} parameter
          24. -
          25. 8161 SHOULD allow string {operationName} parameter when accepting application/graphql-response+json
          26. +
          27. 8161 MUST allow string {operationName} parameter when accepting application/graphql-response+json
          28. B8B3 MUST allow string {operationName} parameter when accepting application/json
          29. -
          30. 94B0 SHOULD allow null {variables} parameter when accepting application/graphql-response+json
          31. +
          32. 94B0 MUST allow null {variables} parameter when accepting application/graphql-response+json
          33. 0220 MUST allow null {variables} parameter when accepting application/json
          34. -
          35. 94B1 SHOULD allow null {operationName} parameter when accepting application/graphql-response+json
          36. +
          37. 94B1 MUST allow null {operationName} parameter when accepting application/graphql-response+json
          38. 0221 MUST allow null {operationName} parameter when accepting application/json
          39. 4760 MAY use 400 status code on string {variables} parameter
          40. 4763 MAY use 400 status code on array {variables} parameter
          41. -
          42. 2EA1 SHOULD allow map {variables} parameter when accepting application/graphql-response+json
          43. +
          44. 2EA1 MUST allow map {variables} parameter when accepting application/graphql-response+json
          45. 28B9 MUST allow map {variables} parameter when accepting application/json
          46. D6D5 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/graphql-response+json
          47. 6A70 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/json
          48. -
          49. 58B0 MAY use 400 status code on string {extensions} parameter
          50. -
          51. 58B1 MAY use 400 status code on number {extensions} parameter
          52. -
          53. 58B2 MAY use 400 status code on boolean {extensions} parameter
          54. -
          55. 58B3 MAY use 400 status code on array {extensions} parameter
          56. -
          57. 428F SHOULD allow map {extensions} parameter when accepting application/graphql-response+json
          58. +
          59. 0280 MUST use 4xx or 5xx status codes on string {extensions} parameter when accepting application/graphql-response+json
          60. +
          61. 0281 MUST use 4xx or 5xx status codes on number {extensions} parameter when accepting application/graphql-response+json
          62. +
          63. 0282 MUST use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/graphql-response+json
          64. +
          65. 0283 MUST use 4xx or 5xx status codes on array {extensions} parameter when accepting application/graphql-response+json
          66. +
          67. 2330 SHOULD use 4xx status code on string {extensions} parameter when accepting application/graphql-response+json
          68. +
          69. 2331 SHOULD use 4xx status code on number {extensions} parameter when accepting application/graphql-response+json
          70. +
          71. 2332 SHOULD use 4xx status code on boolean {extensions} parameter when accepting application/graphql-response+json
          72. +
          73. 2333 SHOULD use 4xx status code on array {extensions} parameter when accepting application/graphql-response+json
          74. +
          75. 58B0 SHOULD use 4xx or 5xx status codes on string {extensions} parameter when accepting application/json
          76. +
          77. 58B1 SHOULD use 4xx or 5xx status codes on number {extensions} parameter when accepting application/json
          78. +
          79. 58B2 SHOULD use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/json
          80. +
          81. 58B3 SHOULD use 4xx or 5xx status codes on array {extensions} parameter when accepting application/json
          82. +
          83. 428F MUST allow map {extensions} parameter when accepting application/graphql-response+json
          84. 1B7A MUST allow map {extensions} parameter when accepting application/json
          85. B6DC MAY use 4xx or 5xx status codes on JSON parsing failure
          86. BCF8 MAY use 400 status code on JSON parsing failure
          87. 8764 MAY use 4xx or 5xx status codes if parameters are invalid
          88. 3E3A MAY use 400 status code if parameters are invalid
          89. 7B9B SHOULD use a status code of 200 on variable coercion failure when accepting application/json
          90. -
          91. 865D SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
          92. +
          93. 865D MUST use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
          94. 556A SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json
          95. -
          96. 51FE SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
          97. +
          98. 51FE MUST use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
          99. 74FF SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json
          @@ -212,53 +220,6 @@ The server MAY support these, but are truly optional. These are suggestio

          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=72",
            -    "date": "",
            -    "content-type": "application/json; charset=utf-8",
            -    "content-length": "31",
            -    "connection": "keep-alive"
            -  },
            -  "body": {
            -    "data": {
            -      "__typename": "Query"
            -    }
            -  }
            -}
            -
            -
            -
          2. -
          3. 94B2 SHOULD allow null {extensions} parameter when accepting application/graphql-response+json -
            -Response status code is not 200 -
            {
            -  "statusText": "Bad Request",
            -  "status": 400,
            -  "headers": {
            -    "keep-alive": "timeout=72",
            -    "date": "",
            -    "content-type": "application/json; charset=utf-8",
            -    "content-length": "69",
            -    "connection": "keep-alive"
            -  },
            -  "body": {
            -    "errors": [
            -      {
            -        "message": "body/extensions must be object"
            -      }
            -    ],
            -    "data": null
            -  }
            -}
            -
            -
            -
          4. 572B SHOULD use 200 status code on document parsing failure when accepting application/json
            Response status code is not 200 @@ -428,6 +389,53 @@ The server SHOULD support these, but is not required.

            Errors

            The server MUST support these.
              +
            1. 22EB MUST 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=72",
              +    "date": "",
              +    "content-type": "application/json; charset=utf-8",
              +    "content-length": "31",
              +    "connection": "keep-alive"
              +  },
              +  "body": {
              +    "data": {
              +      "__typename": "Query"
              +    }
              +  }
              +}
              +
              +
              +
            2. +
            3. 94B2 MUST allow null {extensions} parameter when accepting application/graphql-response+json +
              +Response status code is not 200 +
              {
              +  "statusText": "Bad Request",
              +  "status": 400,
              +  "headers": {
              +    "keep-alive": "timeout=72",
              +    "date": "",
              +    "content-type": "application/json; charset=utf-8",
              +    "content-length": "69",
              +    "connection": "keep-alive"
              +  },
              +  "body": {
              +    "errors": [
              +      {
              +        "message": "body/extensions must be object"
              +      }
              +    ],
              +    "data": null
              +  }
              +}
              +
              +
              +
            4. 0222 MUST allow null {extensions} parameter when accepting application/json
              Response status code is not 200 diff --git a/implementations/mercurius/report.json b/implementations/mercurius/report.json index d68f033b..6c3bb880 100644 --- a/implementations/mercurius/report.json +++ b/implementations/mercurius/report.json @@ -1,7 +1,7 @@ { - "total": 60, - "ok": 46, + "total": 68, + "ok": 54, "notice": 6, - "warn": 7, - "error": 1 + "warn": 5, + "error": 3 } diff --git a/implementations/postgraphile/README.md b/implementations/postgraphile/README.md index cea994fc..ec521761 100644 --- a/implementations/postgraphile/README.md +++ b/implementations/postgraphile/README.md @@ -3,17 +3,18 @@

              GraphQL over HTTP audit report

                -
              • 60 audits in total
              • +
              • 68 audits in total
              • 46 pass
              • -
              • 💡 10 notices (suggestions)
              • -
              • ❗️ 4 warnings (optional)
              • +
              • 💡 6 notices (suggestions)
              • +
              • ❗️ 11 warnings (optional)
              • +
              • 5 errors (required)

              Passing

              1. 4655 MUST accept application/json and match the content-type
              2. -
              3. 47DE SHOULD accept */* and use application/json for the content-type
              4. -
              5. 80D8 SHOULD assume application/json content-type when accept is missing
              6. +
              7. 47DE SHOULD accept */* and use application/graphql-response+json or application/json for the content-type
              8. +
              9. 80D8 SHOULD assume application/json or application/graphql-response+json content-type when accept is missing
              10. 82A3 MUST use utf-8 encoding when responding
              11. BF61 MUST accept utf-8 encoded request
              12. 78D5 MUST assume utf-8 in request if encoding is unspecified
              13. @@ -25,35 +26,35 @@
              14. 423L MAY use 400 status code on missing {query} parameter
              15. LKJ1 MAY use 400 status code on number {query} parameter
              16. LKJ2 MAY use 400 status code on boolean {query} parameter
              17. -
              18. 34A2 SHOULD allow string {query} parameter when accepting application/graphql-response+json
              19. +
              20. 34A2 MUST allow string {query} parameter when accepting application/graphql-response+json
              21. 13EE MUST allow string {query} parameter when accepting application/json
              22. 6C00 MAY use 400 status code on object {operationName} parameter
              23. 6C01 MAY use 400 status code on number {operationName} parameter
              24. 6C02 MAY use 400 status code on boolean {operationName} parameter
              25. 6C03 MAY use 400 status code on array {operationName} parameter
              26. -
              27. 8161 SHOULD allow string {operationName} parameter when accepting application/graphql-response+json
              28. +
              29. 8161 MUST allow string {operationName} parameter when accepting application/graphql-response+json
              30. B8B3 MUST allow string {operationName} parameter when accepting application/json
              31. -
              32. 94B0 SHOULD allow null {variables} parameter when accepting application/graphql-response+json
              33. +
              34. 94B0 MUST allow null {variables} parameter when accepting application/graphql-response+json
              35. 0220 MUST allow null {variables} parameter when accepting application/json
              36. -
              37. 94B1 SHOULD allow null {operationName} parameter when accepting application/graphql-response+json
              38. +
              39. 94B1 MUST allow null {operationName} parameter when accepting application/graphql-response+json
              40. 0221 MUST allow null {operationName} parameter when accepting application/json
              41. -
              42. 94B2 SHOULD allow null {extensions} parameter when accepting application/graphql-response+json
              43. +
              44. 94B2 MUST allow null {extensions} parameter when accepting application/graphql-response+json
              45. 0222 MUST allow null {extensions} parameter when accepting application/json
              46. 4760 MAY use 400 status code on string {variables} parameter
              47. 4761 MAY use 400 status code on number {variables} parameter
              48. 4762 MAY use 400 status code on boolean {variables} parameter
              49. -
              50. 2EA1 SHOULD allow map {variables} parameter when accepting application/graphql-response+json
              51. +
              52. 2EA1 MUST allow map {variables} parameter when accepting application/graphql-response+json
              53. 28B9 MUST allow map {variables} parameter when accepting application/json
              54. -
              55. 428F SHOULD allow map {extensions} parameter when accepting application/graphql-response+json
              56. +
              57. 428F MUST allow map {extensions} parameter when accepting application/graphql-response+json
              58. 1B7A MUST allow map {extensions} parameter when accepting application/json
              59. B6DC MAY use 4xx or 5xx status codes on JSON parsing failure
              60. BCF8 MAY use 400 status code on JSON parsing failure
              61. 8764 MAY use 4xx or 5xx status codes if parameters are invalid
              62. 3E3A MAY use 400 status code if parameters are invalid
              63. -
              64. 865D SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
              65. +
              66. 865D MUST use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
              67. 556A SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json
              68. D586 SHOULD not contain the data entry on document parsing failure when accepting application/graphql-response+json
              69. -
              70. 51FE SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
              71. +
              72. 51FE MUST use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
              73. 74FF SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json
              74. 5E5B SHOULD not contain the data entry on document validation failure when accepting application/graphql-response+json
              75. 86EE SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json
              76. @@ -207,9 +208,14 @@ The server MAY support these, but are truly optional. These are suggestio
            5. -
            6. 58B0 MAY use 400 status code on string {extensions} parameter +
            + +

            Warnings

            +The server SHOULD support these, but is not required. +
              +
            1. 2330 SHOULD use 4xx status code on string {extensions} parameter when accepting application/graphql-response+json
              -Response status code is not 400 +Response status is not between 400 and 499
              {
                 "statusText": "OK",
                 "status": 200,
              @@ -229,9 +235,9 @@ The server MAY support these, but are truly optional. These are suggestio
               
            2. -
            3. 58B1 MAY use 400 status code on number {extensions} parameter +
            4. 2331 SHOULD use 4xx status code on number {extensions} parameter when accepting application/graphql-response+json
              -Response status code is not 400 +Response status is not between 400 and 499
              {
                 "statusText": "OK",
                 "status": 200,
              @@ -251,9 +257,9 @@ The server MAY support these, but are truly optional. These are suggestio
               
            5. -
            6. 58B2 MAY use 400 status code on boolean {extensions} parameter +
            7. 2332 SHOULD use 4xx status code on boolean {extensions} parameter when accepting application/graphql-response+json
              -Response status code is not 400 +Response status is not between 400 and 499
              {
                 "statusText": "OK",
                 "status": 200,
              @@ -273,9 +279,9 @@ The server MAY support these, but are truly optional. These are suggestio
               
            8. -
            9. 58B3 MAY use 400 status code on array {extensions} parameter +
            10. 2333 SHOULD use 4xx status code on array {extensions} parameter when accepting application/graphql-response+json
              -Response status code is not 400 +Response status is not between 400 and 499
              {
                 "statusText": "OK",
                 "status": 200,
              @@ -295,14 +301,75 @@ The server MAY support these, but are truly optional. These are suggestio
               
            11. -
            - -

            Warnings

            -The server SHOULD support these, but is not required. -
              -
            1. 22EB SHOULD accept application/graphql-response+json and match the content-type +
            2. 58B0 SHOULD use 4xx or 5xx status codes on string {extensions} parameter when accepting application/json
              -Response header content-type does not contain application/graphql-response+json +Response status is not between 400 and 599 +
              {
              +  "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"
              +    }
              +  }
              +}
              +
              +
              +
            3. +
            4. 58B1 SHOULD use 4xx or 5xx status codes on number {extensions} parameter when accepting application/json +
              +Response status is not between 400 and 599 +
              {
              +  "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. +
            6. 58B2 SHOULD use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/json +
              +Response status is not between 400 and 599 +
              {
              +  "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"
              +    }
              +  }
              +}
              +
              +
              +
            7. +
            8. 58B3 SHOULD use 4xx or 5xx status codes on array {extensions} parameter when accepting application/json +
              +Response status is not between 400 and 599
              {
                 "statusText": "OK",
                 "status": 200,
              @@ -414,3 +481,117 @@ The server SHOULD support these, but is not required.
               
            +

            Errors

            +The server MUST support these. +
              +
            1. 22EB MUST 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. +
            3. 0280 MUST use 4xx or 5xx status codes on string {extensions} parameter when accepting application/graphql-response+json +
              +Response status is not between 400 and 599 +
              {
              +  "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"
              +    }
              +  }
              +}
              +
              +
              +
            4. +
            5. 0281 MUST use 4xx or 5xx status codes on number {extensions} parameter when accepting application/graphql-response+json +
              +Response status is not between 400 and 599 +
              {
              +  "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"
              +    }
              +  }
              +}
              +
              +
              +
            6. +
            7. 0282 MUST use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/graphql-response+json +
              +Response status is not between 400 and 599 +
              {
              +  "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. +
            9. 0283 MUST use 4xx or 5xx status codes on array {extensions} parameter when accepting application/graphql-response+json +
              +Response status is not between 400 and 599 +
              {
              +  "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. +
            diff --git a/implementations/postgraphile/report.json b/implementations/postgraphile/report.json index af61c47d..25383d18 100644 --- a/implementations/postgraphile/report.json +++ b/implementations/postgraphile/report.json @@ -1,7 +1,7 @@ { - "total": 60, + "total": 68, "ok": 46, - "notice": 10, - "warn": 4, - "error": 0 + "notice": 6, + "warn": 11, + "error": 5 } diff --git a/implementations/thegraph/README.md b/implementations/thegraph/README.md index 7f76bee8..eb2a547f 100644 --- a/implementations/thegraph/README.md +++ b/implementations/thegraph/README.md @@ -3,29 +3,29 @@

            GraphQL over HTTP audit report

              -
            • 60 audits in total
            • +
            • 68 audits in total
            • 19 pass
            • -
            • 💡 25 notices (suggestions)
            • -
            • ❗️ 9 warnings (optional)
            • -
            • 7 errors (required)
            • +
            • 💡 21 notices (suggestions)
            • +
            • ❗️ 11 warnings (optional)
            • +
            • 17 errors (required)

            Passing

            1. 4655 MUST accept application/json and match the content-type
            2. -
            3. 47DE SHOULD accept */* and use application/json for the content-type
            4. -
            5. 80D8 SHOULD assume application/json content-type when accept is missing
            6. +
            7. 47DE SHOULD accept */* and use application/graphql-response+json or application/json for the content-type
            8. +
            9. 80D8 SHOULD assume application/json or application/graphql-response+json content-type when accept is missing
            10. 82A3 MUST use utf-8 encoding when responding
            11. BF61 MUST accept utf-8 encoded request
            12. 78D5 MUST assume utf-8 in request if encoding is unspecified
            13. 2C94 MUST accept POST requests
            14. 5A70 MAY accept application/x-www-form-urlencoded formatted GET requests
            15. 03D4 MUST accept application/json POST requests
            16. -
            17. 34A2 SHOULD allow string {query} parameter when accepting application/graphql-response+json
            18. -
            19. 8161 SHOULD allow string {operationName} parameter when accepting application/graphql-response+json
            20. -
            21. 2EA1 SHOULD allow map {variables} parameter when accepting application/graphql-response+json
            22. +
            23. 34A2 MUST allow string {query} parameter when accepting application/graphql-response+json
            24. +
            25. 8161 MUST allow string {operationName} parameter when accepting application/graphql-response+json
            26. +
            27. 2EA1 MUST allow map {variables} parameter when accepting application/graphql-response+json
            28. D6D5 MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/graphql-response+json
            29. -
            30. 428F SHOULD allow map {extensions} parameter when accepting application/graphql-response+json
            31. +
            32. 428F MUST allow map {extensions} parameter when accepting application/graphql-response+json
            33. 572B SHOULD use 200 status code on document parsing failure when accepting application/json
            34. FDE2 SHOULD use 200 status code on document validation failure when accepting application/json
            35. 7B9B SHOULD use a status code of 200 on variable coercion failure when accepting application/json
            36. @@ -614,9 +614,9 @@ The server MAY support these, but are truly optional. These are suggestio
          5. -
          6. 58B0 MAY use 400 status code on string {extensions} parameter +
          7. B6DC MAY use 4xx or 5xx status codes on JSON parsing failure
            -Response status code is not 400 +Response status is not between 400 and 499
            {
               "statusText": "OK",
               "status": 200,
            @@ -648,7 +648,7 @@ The server MAY support these, but are truly optional. These are suggestio
             
          8. -
          9. 58B1 MAY use 400 status code on number {extensions} parameter +
          10. BCF8 MAY use 400 status code on JSON parsing failure
            Response status code is not 400
            {
            @@ -682,9 +682,9 @@ The server MAY support these, but are truly optional. These are suggestio
             
          11. -
          12. 58B2 MAY use 400 status code on boolean {extensions} parameter +
          13. 8764 MAY use 4xx or 5xx status codes if parameters are invalid
            -Response status code is not 400 +Response status is not between 400 and 599
            {
               "statusText": "OK",
               "status": 200,
            @@ -716,7 +716,7 @@ The server MAY support these, but are truly optional. These are suggestio
             
          14. -
          15. 58B3 MAY use 400 status code on array {extensions} parameter +
          16. 3E3A MAY use 400 status code if parameters are invalid
            Response status code is not 400
            {
            @@ -750,7 +750,12 @@ The server MAY support these, but are truly optional. These are suggestio
             
          17. -
          18. B6DC MAY use 4xx or 5xx status codes on JSON parsing failure +
          + +

          Warnings

          +The server SHOULD support these, but is not required. +
            +
          1. 2330 SHOULD use 4xx status code on string {extensions} parameter when accepting application/graphql-response+json
            Response status is not between 400 and 499
            {
            @@ -784,9 +789,9 @@ The server MAY support these, but are truly optional. These are suggestio
             
          2. -
          3. BCF8 MAY use 400 status code on JSON parsing failure +
          4. 2331 SHOULD use 4xx status code on number {extensions} parameter when accepting application/graphql-response+json
            -Response status code is not 400 +Response status is not between 400 and 499
            {
               "statusText": "OK",
               "status": 200,
            @@ -818,9 +823,9 @@ The server MAY support these, but are truly optional. These are suggestio
             
          5. -
          6. 8764 MAY use 4xx or 5xx status codes if parameters are invalid +
          7. 2332 SHOULD use 4xx status code on boolean {extensions} parameter when accepting application/graphql-response+json
            -Response status is not between 400 and 599 +Response status is not between 400 and 499
            {
               "statusText": "OK",
               "status": 200,
            @@ -852,9 +857,9 @@ The server MAY support these, but are truly optional. These are suggestio
             
          8. -
          9. 3E3A MAY use 400 status code if parameters are invalid +
          10. 2333 SHOULD use 4xx status code on array {extensions} parameter when accepting application/graphql-response+json
            -Response status code is not 400 +Response status is not between 400 and 499
            {
               "statusText": "OK",
               "status": 200,
            @@ -886,14 +891,9 @@ The server MAY support these, but are truly optional. These are suggestio
             
          11. -
          - -

          Warnings

          -The server SHOULD support these, but is not required. -
            -
          1. 22EB SHOULD accept application/graphql-response+json and match the content-type +
          2. 58B0 SHOULD use 4xx or 5xx status codes on string {extensions} parameter when accepting application/json
            -Response header content-type does not contain application/graphql-response+json +Response status is not between 400 and 599
            {
               "statusText": "OK",
               "status": 200,
            @@ -925,9 +925,9 @@ The server SHOULD support these, but is not required.
             
          3. -
          4. 94B0 SHOULD allow null {variables} parameter when accepting application/graphql-response+json +
          5. 58B1 SHOULD use 4xx or 5xx status codes on number {extensions} parameter when accepting application/json
            -Response body execution result has a property "errors" +Response status is not between 400 and 599
            {
               "statusText": "OK",
               "status": 200,
            @@ -959,9 +959,9 @@ The server SHOULD support these, but is not required.
             
          6. -
          7. 94B1 SHOULD allow null {operationName} parameter when accepting application/graphql-response+json +
          8. 58B2 SHOULD use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/json
            -Response body execution result has a property "errors" +Response status is not between 400 and 599
            {
               "statusText": "OK",
               "status": 200,
            @@ -993,9 +993,9 @@ The server SHOULD support these, but is not required.
             
          9. -
          10. 94B2 SHOULD allow null {extensions} parameter when accepting application/graphql-response+json +
          11. 58B3 SHOULD use 4xx or 5xx status codes on array {extensions} parameter when accepting application/json
            -Response body execution result has a property "errors" +Response status is not between 400 and 599
            {
               "statusText": "OK",
               "status": 200,
            @@ -1027,9 +1027,9 @@ The server SHOULD support these, but is not required.
             
          12. -
          13. 865D SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json +
          14. 556A SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json
            -Response status is not between 400 and 599 +Response status code is not 400
            {
               "statusText": "OK",
               "status": 200,
            @@ -1061,7 +1061,7 @@ The server SHOULD support these, but is not required.
             
          15. -
          16. 556A SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json +
          17. 74FF SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json
            Response status code is not 400
            {
            @@ -1095,9 +1095,9 @@ The server SHOULD support these, but is not required.
             
          18. -
          19. 51FE SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json +
          20. 86EE SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json
            -Response status is not between 400 and 599 +Response status code is not 400
            {
               "statusText": "OK",
               "status": 200,
            @@ -1129,9 +1129,14 @@ The server SHOULD support these, but is not required.
             
          21. -
          22. 74FF SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json +
          + +

          Errors

          +The server MUST support these. +
            +
          1. 22EB MUST accept application/graphql-response+json and match the content-type
            -Response status code is not 400 +Response header content-type does not contain application/graphql-response+json
            {
               "statusText": "OK",
               "status": 200,
            @@ -1163,9 +1168,9 @@ The server SHOULD support these, but is not required.
             
          2. -
          3. 86EE SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json +
          4. 13EE MUST allow string {query} parameter when accepting application/json
            -Response status code is not 400 +Response body execution result has a property "errors"
            {
               "statusText": "OK",
               "status": 200,
            @@ -1197,12 +1202,7 @@ The server SHOULD support these, but is not required.
             
          5. -
          - -

          Errors

          -The server MUST support these. -
            -
          1. 13EE MUST allow string {query} parameter when accepting application/json +
          2. B8B3 MUST allow string {operationName} parameter when accepting application/json
            Response body execution result has a property "errors"
            {
            @@ -1236,7 +1236,7 @@ The server MUST support these.
             
          3. -
          4. B8B3 MUST allow string {operationName} parameter when accepting application/json +
          5. 94B0 MUST allow null {variables} parameter when accepting application/graphql-response+json
            Response body execution result has a property "errors"
            {
            @@ -1304,6 +1304,40 @@ The server MUST support these.
             
          6. +
          7. 94B1 MUST allow null {operationName} parameter when accepting application/graphql-response+json +
            +Response body execution result has a property "errors" +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "vary": "Accept-Encoding",
            +    "transfer-encoding": "chunked",
            +    "set-cookie": "",
            +    "server": "cloudflare",
            +    "last-modified": "Mon, 02 Dec 2024 20:56:39 GMT",
            +    "expires": "",
            +    "etag": "W/\"cffa996b9fb9470d034909269c4d8d0f\"",
            +    "date": "",
            +    "content-type": "application/json",
            +    "content-encoding": "br",
            +    "connection": "keep-alive",
            +    "cf-ray": "",
            +    "cf-cache-status": "HIT",
            +    "cache-control": "public, max-age=3600",
            +    "age": ""
            +  },
            +  "body": {
            +    "errors": [
            +      {
            +        "message": "This endpoint has been removed. If you have any questions, reach out to support@thegraph.zendesk.com"
            +      }
            +    ]
            +  }
            +}
            +
            +
            +
          8. 0221 MUST allow null {operationName} parameter when accepting application/json
            Response body execution result has a property "errors" @@ -1338,6 +1372,40 @@ The server MUST support these.
          9. +
          10. 94B2 MUST allow null {extensions} parameter when accepting application/graphql-response+json +
            +Response body execution result has a property "errors" +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "vary": "Accept-Encoding",
            +    "transfer-encoding": "chunked",
            +    "set-cookie": "",
            +    "server": "cloudflare",
            +    "last-modified": "Mon, 02 Dec 2024 20:56:39 GMT",
            +    "expires": "",
            +    "etag": "W/\"cffa996b9fb9470d034909269c4d8d0f\"",
            +    "date": "",
            +    "content-type": "application/json",
            +    "content-encoding": "br",
            +    "connection": "keep-alive",
            +    "cf-ray": "",
            +    "cf-cache-status": "HIT",
            +    "cache-control": "public, max-age=3600",
            +    "age": ""
            +  },
            +  "body": {
            +    "errors": [
            +      {
            +        "message": "This endpoint has been removed. If you have any questions, reach out to support@thegraph.zendesk.com"
            +      }
            +    ]
            +  }
            +}
            +
            +
            +
          11. 0222 MUST allow null {extensions} parameter when accepting application/json
            Response body execution result has a property "errors" @@ -1406,6 +1474,142 @@ The server MUST support these.
          12. +
          13. 0280 MUST use 4xx or 5xx status codes on string {extensions} parameter when accepting application/graphql-response+json +
            +Response status is not between 400 and 599 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "vary": "Accept-Encoding",
            +    "transfer-encoding": "chunked",
            +    "set-cookie": "",
            +    "server": "cloudflare",
            +    "last-modified": "Mon, 02 Dec 2024 20:56:39 GMT",
            +    "expires": "",
            +    "etag": "W/\"cffa996b9fb9470d034909269c4d8d0f\"",
            +    "date": "",
            +    "content-type": "application/json",
            +    "content-encoding": "br",
            +    "connection": "keep-alive",
            +    "cf-ray": "",
            +    "cf-cache-status": "HIT",
            +    "cache-control": "public, max-age=3600",
            +    "age": ""
            +  },
            +  "body": {
            +    "errors": [
            +      {
            +        "message": "This endpoint has been removed. If you have any questions, reach out to support@thegraph.zendesk.com"
            +      }
            +    ]
            +  }
            +}
            +
            +
            +
          14. +
          15. 0281 MUST use 4xx or 5xx status codes on number {extensions} parameter when accepting application/graphql-response+json +
            +Response status is not between 400 and 599 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "vary": "Accept-Encoding",
            +    "transfer-encoding": "chunked",
            +    "set-cookie": "",
            +    "server": "cloudflare",
            +    "last-modified": "Mon, 02 Dec 2024 20:56:39 GMT",
            +    "expires": "",
            +    "etag": "W/\"cffa996b9fb9470d034909269c4d8d0f\"",
            +    "date": "",
            +    "content-type": "application/json",
            +    "content-encoding": "br",
            +    "connection": "keep-alive",
            +    "cf-ray": "",
            +    "cf-cache-status": "HIT",
            +    "cache-control": "public, max-age=3600",
            +    "age": ""
            +  },
            +  "body": {
            +    "errors": [
            +      {
            +        "message": "This endpoint has been removed. If you have any questions, reach out to support@thegraph.zendesk.com"
            +      }
            +    ]
            +  }
            +}
            +
            +
            +
          16. +
          17. 0282 MUST use 4xx or 5xx status codes on boolean {extensions} parameter when accepting application/graphql-response+json +
            +Response status is not between 400 and 599 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "vary": "Accept-Encoding",
            +    "transfer-encoding": "chunked",
            +    "set-cookie": "",
            +    "server": "cloudflare",
            +    "last-modified": "Mon, 02 Dec 2024 20:56:39 GMT",
            +    "expires": "",
            +    "etag": "W/\"cffa996b9fb9470d034909269c4d8d0f\"",
            +    "date": "",
            +    "content-type": "application/json",
            +    "content-encoding": "br",
            +    "connection": "keep-alive",
            +    "cf-ray": "",
            +    "cf-cache-status": "HIT",
            +    "cache-control": "public, max-age=3600",
            +    "age": ""
            +  },
            +  "body": {
            +    "errors": [
            +      {
            +        "message": "This endpoint has been removed. If you have any questions, reach out to support@thegraph.zendesk.com"
            +      }
            +    ]
            +  }
            +}
            +
            +
            +
          18. +
          19. 0283 MUST use 4xx or 5xx status codes on array {extensions} parameter when accepting application/graphql-response+json +
            +Response status is not between 400 and 599 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "vary": "Accept-Encoding",
            +    "transfer-encoding": "chunked",
            +    "set-cookie": "",
            +    "server": "cloudflare",
            +    "last-modified": "Mon, 02 Dec 2024 20:56:39 GMT",
            +    "expires": "",
            +    "etag": "W/\"cffa996b9fb9470d034909269c4d8d0f\"",
            +    "date": "",
            +    "content-type": "application/json",
            +    "content-encoding": "br",
            +    "connection": "keep-alive",
            +    "cf-ray": "",
            +    "cf-cache-status": "HIT",
            +    "cache-control": "public, max-age=3600",
            +    "age": ""
            +  },
            +  "body": {
            +    "errors": [
            +      {
            +        "message": "This endpoint has been removed. If you have any questions, reach out to support@thegraph.zendesk.com"
            +      }
            +    ]
            +  }
            +}
            +
            +
            +
          20. 1B7A MUST allow map {extensions} parameter when accepting application/json
            Response body execution result has a property "errors" @@ -1440,4 +1644,72 @@ The server MUST support these.
          21. +
          22. 865D MUST use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json +
            +Response status is not between 400 and 599 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "vary": "Accept-Encoding",
            +    "transfer-encoding": "chunked",
            +    "set-cookie": "",
            +    "server": "cloudflare",
            +    "last-modified": "Mon, 02 Dec 2024 20:56:39 GMT",
            +    "expires": "",
            +    "etag": "W/\"cffa996b9fb9470d034909269c4d8d0f\"",
            +    "date": "",
            +    "content-type": "application/json",
            +    "content-encoding": "br",
            +    "connection": "keep-alive",
            +    "cf-ray": "",
            +    "cf-cache-status": "HIT",
            +    "cache-control": "public, max-age=3600",
            +    "age": ""
            +  },
            +  "body": {
            +    "errors": [
            +      {
            +        "message": "This endpoint has been removed. If you have any questions, reach out to support@thegraph.zendesk.com"
            +      }
            +    ]
            +  }
            +}
            +
            +
            +
          23. +
          24. 51FE MUST use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json +
            +Response status is not between 400 and 599 +
            {
            +  "statusText": "OK",
            +  "status": 200,
            +  "headers": {
            +    "vary": "Accept-Encoding",
            +    "transfer-encoding": "chunked",
            +    "set-cookie": "",
            +    "server": "cloudflare",
            +    "last-modified": "Mon, 02 Dec 2024 20:56:39 GMT",
            +    "expires": "",
            +    "etag": "W/\"cffa996b9fb9470d034909269c4d8d0f\"",
            +    "date": "",
            +    "content-type": "application/json",
            +    "content-encoding": "br",
            +    "connection": "keep-alive",
            +    "cf-ray": "",
            +    "cf-cache-status": "HIT",
            +    "cache-control": "public, max-age=3600",
            +    "age": ""
            +  },
            +  "body": {
            +    "errors": [
            +      {
            +        "message": "This endpoint has been removed. If you have any questions, reach out to support@thegraph.zendesk.com"
            +      }
            +    ]
            +  }
            +}
            +
            +
            +
          diff --git a/implementations/thegraph/report.json b/implementations/thegraph/report.json index 22374362..553c5b64 100644 --- a/implementations/thegraph/report.json +++ b/implementations/thegraph/report.json @@ -1,7 +1,7 @@ { - "total": 60, + "total": 68, "ok": 19, - "notice": 25, - "warn": 9, - "error": 7 + "notice": 21, + "warn": 11, + "error": 17 } diff --git a/src/audits/server.ts b/src/audits/server.ts index c3708540..77551396 100644 --- a/src/audits/server.ts +++ b/src/audits/server.ts @@ -40,9 +40,8 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] { return [ // Media Types audit( - // TODO: convert to MUST after watershed '22EB', - 'SHOULD accept application/graphql-response+json and match the content-type', + 'MUST accept application/graphql-response+json and match the content-type', async () => { const res = await fetchFn(await getUrl(opts.url), { method: 'POST', @@ -76,7 +75,7 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] { ), audit( '47DE', - 'SHOULD accept */* and use application/json for the content-type', + 'SHOULD accept */* and use application/graphql-response+json or application/json for the content-type', async () => { const res = await fetchFn(await getUrl(opts.url), { method: 'POST', @@ -87,12 +86,18 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] { body: JSON.stringify({ query: '{ __typename }' }), }); ressert(res).status.toBe(200); - ressert(res).header('content-type').toContain('application/json'); + try { + ressert(res) + .header('content-type') + .toContain('application/graphql-response+json'); + } catch { + ressert(res).header('content-type').toContain('application/json'); + } }, ), audit( '80D8', - 'SHOULD assume application/json content-type when accept is missing', + 'SHOULD assume application/json or application/graphql-response+json content-type when accept is missing', async () => { const res = await fetchFn(await getUrl(opts.url), { method: 'POST', @@ -103,7 +108,13 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] { }); ressert(res).status.toBe(200); - ressert(res).header('content-type').toContain('application/json'); + try { + ressert(res) + .header('content-type') + .toContain('application/graphql-response+json'); + } catch { + ressert(res).header('content-type').toContain('application/json'); + } }, ), audit('82A3', 'MUST use utf-8 encoding when responding', async () => { @@ -255,9 +266,8 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] { ), ), audit( - // TODO: convert to MUST after watershed '34A2', - 'SHOULD allow string {query} parameter when accepting application/graphql-response+json', + 'MUST allow string {query} parameter when accepting application/graphql-response+json', async () => { const res = await fetchFn(await getUrl(opts.url), { method: 'POST', @@ -312,9 +322,8 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] { ), ), audit( - // TODO: convert to MUST after watershed '8161', - 'SHOULD allow string {operationName} parameter when accepting application/graphql-response+json', + 'MUST allow string {operationName} parameter when accepting application/graphql-response+json', async () => { const res = await fetchFn(await getUrl(opts.url), { method: 'POST', @@ -353,8 +362,7 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] { (parameter, index) => [ audit( `94B${index}`, - // TODO: convert to MUST after watershed - `SHOULD allow null {${parameter}} parameter when accepting application/graphql-response+json`, + `MUST allow null {${parameter}} parameter when accepting application/graphql-response+json`, async () => { const res = await fetchFn(await getUrl(opts.url), { method: 'POST', @@ -418,9 +426,8 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] { ), ), audit( - // TODO: convert to MUST after watershed '2EA1', - 'SHOULD allow map {variables} parameter when accepting application/graphql-response+json', + 'MUST allow map {variables} parameter when accepting application/graphql-response+json', async () => { const res = await fetchFn(await getUrl(opts.url), { method: 'POST', @@ -496,32 +503,75 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] { await ressert(res).bodyAsExecutionResult.notToHaveProperty('errors'); }, ), + ...['string', 0, false, ['array']].map((invalid, index) => + audit( + `028${index}`, + `MUST use 4xx or 5xx status codes on ${extendedTypeof( + invalid, + )} {extensions} parameter when accepting application/graphql-response+json`, + async () => { + const res = await fetchFn(await getUrl(opts.url), { + method: 'POST', + headers: { + 'content-type': 'application/json', + accept: 'application/graphql-response+json', + }, + body: JSON.stringify({ + query: '{ __typename }', + extensions: invalid, + }), + }); + ressert(res).status.toBeBetween(400, 599); + }, + ), + ), + ...['string', 0, false, ['array']].map((invalid, index) => + audit( + `233${index}`, + `SHOULD use 4xx status code on ${extendedTypeof( + invalid, + )} {extensions} parameter when accepting application/graphql-response+json`, + async () => { + const res = await fetchFn(await getUrl(opts.url), { + method: 'POST', + headers: { + 'content-type': 'application/json', + accept: 'application/graphql-response+json', + }, + body: JSON.stringify({ + query: '{ __typename }', + extensions: invalid, + }), + }); + ressert(res).status.toBeBetween(400, 499); + }, + ), + ), ...['string', 0, false, ['array']].map((invalid, index) => audit( `58B${index}`, - // TODO: convert to MUST after watershed - `MAY use 400 status code on ${extendedTypeof( + `SHOULD use 4xx or 5xx status codes on ${extendedTypeof( invalid, - )} {extensions} parameter`, + )} {extensions} parameter when accepting application/json`, async () => { const res = await fetchFn(await getUrl(opts.url), { method: 'POST', headers: { 'content-type': 'application/json', + accept: 'application/json', }, body: JSON.stringify({ query: '{ __typename }', extensions: invalid, }), }); - ressert(res).status.toBe(400); + ressert(res).status.toBeBetween(400, 599); }, ), ), audit( - // TODO: convert to MUST after watershed '428F', - 'SHOULD allow map {extensions} parameter when accepting application/graphql-response+json', + 'MUST allow map {extensions} parameter when accepting application/graphql-response+json', async () => { const res = await fetchFn(await getUrl(opts.url), { method: 'POST', @@ -670,9 +720,8 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] { ), // Response application/graphql-response+json audit( - // TODO: convert to MUST after watershed '865D', - 'SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json', + 'MUST use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json', async () => { const res = await fetchFn(await getUrl(opts.url), { method: 'POST', @@ -722,9 +771,8 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] { }, ), audit( - // TODO: convert to MUST after watershed '51FE', - 'SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json', + 'MUST use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json', async () => { const res = await fetchFn(await getUrl(opts.url), { method: 'POST',