You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/starwars/__schema.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -83,10 +83,10 @@
83
83
$Query = newGraphQLObjectType("Query", "Root Query", function () use (&$Episode, &$Character, &$Human, &$Droid, &$humans, &$droids) {
84
84
return [
85
85
newGraphQLTypeField("hero", $Character, "", function ($_, $args) use (&$humans, &$droids) {
86
-
if (($args["episode"] ?? null) === "JEDI") {
86
+
if (($args["episode"] ?? null) === "EMPIRE") {
87
87
return$humans["1000"]; // Luke Skywalker
88
88
}
89
-
return$droids["2000"]; // R2-D2
89
+
return$droids["2001"]; // R2-D2
90
90
}, [
91
91
newGraphQLFieldArgument("episode", $Episode, "If omitted, returns the hero of the whole saga. If provided, returns the hero of that particular episode")
0 commit comments