Skip to content

Commit d9e0d56

Browse files
committed
1. laravel graphql - intro to lighthouse php
1 parent a5a82a9 commit d9e0d56

7 files changed

+2582
-2
lines changed

_lighthouse_ide_helper.php

+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
<?php
2+
# File generated by "php artisan lighthouse:ide-helper".
3+
# Do not edit this file directly.
4+
# This file should be ignored by git as it can be autogenerated.
5+
6+
7+
namespace Illuminate\Foundation\Testing {
8+
class TestResponse
9+
{
10+
/**
11+
* Asserts that the response contains an error from a given category.
12+
*
13+
* @param string $category The name of the expected error category.
14+
* @return $this
15+
*/
16+
public function assertGraphQLErrorCategory(string $category): self
17+
{
18+
return $this;
19+
}
20+
21+
/**
22+
* Assert that the returned result contains exactly the given validation keys.
23+
*
24+
* @param array $keys The validation keys the result should have.
25+
* @return $this
26+
*/
27+
public function assertGraphQLValidationKeys(array $keys): self
28+
{
29+
return $this;
30+
}
31+
32+
/**
33+
* Assert that a given validation error is present in the response.
34+
*
35+
* @param string $key The validation key that should be present.
36+
* @param string $message The expected validation message.
37+
* @return $this
38+
*/
39+
public function assertGraphQLValidationError(string $key, string $message): self
40+
{
41+
return $this;
42+
}
43+
44+
/**
45+
* Assert that no validation errors are present in the response.
46+
*
47+
* @return $this
48+
*/
49+
public function assertGraphQLValidationPasses(): self
50+
{
51+
return $this;
52+
}
53+
}
54+
}
55+
56+
namespace Illuminate\Testing {
57+
class TestResponse
58+
{
59+
/**
60+
* Assert the response contains an error with the given message.
61+
*
62+
* @param string $message The expected error message.
63+
* @return $this
64+
*/
65+
public function assertGraphQLErrorMessage(string $message): self
66+
{
67+
return $this;
68+
}
69+
70+
/**
71+
* Assert the response contains an error from the given category.
72+
*
73+
* @param string $category The name of the expected error category.
74+
* @return $this
75+
*/
76+
public function assertGraphQLErrorCategory(string $category): self
77+
{
78+
return $this;
79+
}
80+
81+
/**
82+
* Assert the returned result contains exactly the given validation keys.
83+
*
84+
* @param array $keys The validation keys the result should have.
85+
* @return $this
86+
*/
87+
public function assertGraphQLValidationKeys(array $keys): self
88+
{
89+
return $this;
90+
}
91+
92+
/**
93+
* Assert a given validation error is present in the response.
94+
*
95+
* @param string $key The validation key that should be present.
96+
* @param string $message The expected validation message.
97+
* @return $this
98+
*/
99+
public function assertGraphQLValidationError(string $key, string $message): self
100+
{
101+
return $this;
102+
}
103+
104+
/**
105+
* Assert no validation errors are present in the response.
106+
*
107+
* @return $this
108+
*/
109+
public function assertGraphQLValidationPasses(): self
110+
{
111+
return $this;
112+
}
113+
}
114+
}
115+
116+
namespace GraphQL\Type\Definition {
117+
class ResolveInfo
118+
{
119+
/**
120+
* We monkey patch this onto here to pass it down the resolver chain.
121+
*
122+
* @var \Nuwave\Lighthouse\Execution\Arguments\ArgumentSet
123+
*/
124+
public $argumentSet;
125+
}
126+
}

composer.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
"guzzlehttp/guzzle": "^7.0.1",
1111
"laravel/framework": "^8.54",
1212
"laravel/sanctum": "^2.11",
13-
"laravel/tinker": "^2.5"
13+
"laravel/tinker": "^2.5",
14+
"mll-lab/laravel-graphql-playground": "^2.5",
15+
"nuwave/lighthouse": "^5.23"
1416
},
1517
"require-dev": {
1618
"facade/ignition": "^2.5",

0 commit comments

Comments
 (0)