diff --git a/README.md b/README.md index 27f1cca4..19a144d3 100644 --- a/README.md +++ b/README.md @@ -788,6 +788,7 @@ Their compliance with the [GraphQL over HTTP spec](https://graphql.github.io/gra | [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/lighthouse/Dockerfile b/implementations/lighthouse/Dockerfile new file mode 100644 index 00000000..7a1f563f --- /dev/null +++ b/implementations/lighthouse/Dockerfile @@ -0,0 +1,17 @@ +FROM php:8.1-cli + +WORKDIR /app + +COPY --from=composer /usr/bin/composer /usr/bin/composer + +RUN apt-get update && \ + apt-get install --yes \ + git \ + libzip-dev \ + zip \ + && docker-php-ext-install \ + zip \ + && rm -rf /var/lib/apt/lists/* +RUN composer create-project laravel/laravel /app +RUN composer require nuwave/lighthouse +RUN php artisan vendor:publish --tag=lighthouse-schema diff --git a/implementations/lighthouse/README.md b/implementations/lighthouse/README.md new file mode 100644 index 00000000..ab59b418 --- /dev/null +++ b/implementations/lighthouse/README.md @@ -0,0 +1,282 @@ +* This report was auto-generated by graphql-http + +
4655
MUST accept application/json and match the content-type47DE
SHOULD accept */* and use application/json for the content-type80D8
SHOULD assume application/json content-type when accept is missing82A3
MUST use utf-8 encoding when respondingBF61
MUST accept utf-8 encoded request78D5
MUST assume utf-8 in request if encoding is unspecified2C94
MUST accept POST requests5A70
MAY accept application/x-www-form-urlencoded formatted GET requests03D4
MUST accept application/json POST requests34A2
SHOULD allow string {query} parameter when accepting application/graphql-response+json13EE
MUST allow string {query} parameter when accepting application/json8161
SHOULD allow string {operationName} parameter when accepting application/graphql-response+jsonB8B3
MUST allow string {operationName} parameter when accepting application/json94B0
SHOULD allow null {variables} parameter when accepting application/graphql-response+json0220
MUST allow null {variables} parameter when accepting application/json94B1
SHOULD allow null {operationName} parameter when accepting application/graphql-response+json0221
MUST allow null {operationName} parameter when accepting application/json94B2
SHOULD allow null {extensions} parameter when accepting application/graphql-response+json0222
MUST allow null {extensions} parameter when accepting application/json2EA1
SHOULD allow map {variables} parameter when accepting application/graphql-response+json28B9
MUST allow map {variables} parameter when accepting application/jsonD6D5
MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/graphql-response+json6A70
MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/json428F
SHOULD allow map {extensions} parameter when accepting application/graphql-response+json1B7A
MUST allow map {extensions} parameter when accepting application/json572B
SHOULD use 200 status code on document parsing failure when accepting application/jsonFDE2
SHOULD use 200 status code on document validation failure when accepting application/json7B9B
SHOULD use a status code of 200 on variable coercion failure when accepting application/jsonD586
SHOULD not contain the data entry on document parsing failure when accepting application/graphql-response+json5E5B
SHOULD not contain the data entry on document validation failure when accepting application/graphql-response+json22EB
SHOULD accept application/graphql-response+json and match the content-type
+{
+ "statusText": "OK",
+ "status": 200,
+ "headers": {
+ "x-powered-by": "PHP/8.1.17",
+ "host": "localhost:4000",
+ "date": "",
+ "content-type": "application/json",
+ "connection": "close",
+ "cache-control": "no-cache, private"
+ },
+ "body": {
+ "data": {
+ "__typename": "Query"
+ }
+ }
+}
+
+9C48
MAY NOT allow executing mutations on GET requests
+{
+ "statusText": "OK",
+ "status": 200,
+ "headers": {
+ "x-powered-by": "PHP/8.1.17",
+ "host": "localhost:4000",
+ "date": "",
+ "content-type": "application/json",
+ "connection": "close",
+ "cache-control": "no-cache, private"
+ },
+ "body": {
+ "errors": [
+ {
+ "message": "Schema is not configured for mutations.",
+ "locations": [
+ {
+ "line": 1,
+ "column": 1
+ }
+ ],
+ "extensions": {
+ "line": 350,
+ "file": "/app/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php"
+ }
+ }
+ ]
+ }
+}
+
+865D
SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json
+{
+ "statusText": "OK",
+ "status": 200,
+ "headers": {
+ "x-powered-by": "PHP/8.1.17",
+ "host": "localhost:4000",
+ "date": "",
+ "content-type": "application/json",
+ "connection": "close",
+ "cache-control": "no-cache, private"
+ },
+ "body": {
+ "errors": [
+ {
+ "message": "Syntax Error: Expected Name, found ",
+ "locations": [
+ {
+ "line": 1,
+ "column": 2
+ }
+ ],
+ "extensions": {
+ "line": 383,
+ "file": "/app/vendor/webonyx/graphql-php/src/Language/Parser.php"
+ }
+ }
+ ]
+ }
+}
+
+556A
SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json
+{
+ "statusText": "OK",
+ "status": 200,
+ "headers": {
+ "x-powered-by": "PHP/8.1.17",
+ "host": "localhost:4000",
+ "date": "",
+ "content-type": "application/json",
+ "connection": "close",
+ "cache-control": "no-cache, private"
+ },
+ "body": {
+ "errors": [
+ {
+ "message": "Syntax Error: Expected Name, found ",
+ "locations": [
+ {
+ "line": 1,
+ "column": 2
+ }
+ ],
+ "extensions": {
+ "line": 383,
+ "file": "/app/vendor/webonyx/graphql-php/src/Language/Parser.php"
+ }
+ }
+ ]
+ }
+}
+
+51FE
SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json
+{
+ "statusText": "OK",
+ "status": 200,
+ "headers": {
+ "x-powered-by": "PHP/8.1.17",
+ "host": "localhost:4000",
+ "date": "",
+ "content-type": "application/json",
+ "connection": "close",
+ "cache-control": "no-cache, private"
+ },
+ "body": {
+ "errors": [
+ {
+ "message": "Syntax Error: Expected Name, found Int \"8\"",
+ "locations": [
+ {
+ "line": 1,
+ "column": 3
+ }
+ ],
+ "extensions": {
+ "line": 383,
+ "file": "/app/vendor/webonyx/graphql-php/src/Language/Parser.php"
+ }
+ }
+ ]
+ }
+}
+
+74FF
SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json
+{
+ "statusText": "OK",
+ "status": 200,
+ "headers": {
+ "x-powered-by": "PHP/8.1.17",
+ "host": "localhost:4000",
+ "date": "",
+ "content-type": "application/json",
+ "connection": "close",
+ "cache-control": "no-cache, private"
+ },
+ "body": {
+ "errors": [
+ {
+ "message": "Syntax Error: Expected Name, found Int \"8\"",
+ "locations": [
+ {
+ "line": 1,
+ "column": 3
+ }
+ ],
+ "extensions": {
+ "line": 383,
+ "file": "/app/vendor/webonyx/graphql-php/src/Language/Parser.php"
+ }
+ }
+ ]
+ }
+}
+
+86EE
SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json
+{
+ "statusText": "OK",
+ "status": 200,
+ "headers": {
+ "x-powered-by": "PHP/8.1.17",
+ "host": "localhost:4000",
+ "date": "",
+ "content-type": "application/json",
+ "connection": "close",
+ "cache-control": "no-cache, private"
+ },
+ "body": {
+ "errors": [
+ {
+ "message": "Variable \"$id\" is never used in operation \"CoerceFailure\".",
+ "locations": [
+ {
+ "line": 1,
+ "column": 21
+ }
+ ],
+ "extensions": {
+ "line": 41,
+ "file": "/app/vendor/webonyx/graphql-php/src/Validator/Rules/NoUnusedVariables.php"
+ }
+ }
+ ]
+ }
+}
+
+