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: src/Type/Definition/ResolveInfo.php
+97-45
Original file line number
Diff line number
Diff line change
@@ -221,8 +221,10 @@ public function getFieldSelection(int $depth = 0): array
221
221
*
222
222
* The result maps original field names to a map of selections for that field, including aliases.
223
223
* For each of those selections, you can find the following keys:
224
-
* - "args" contains the passed arguments for this field/alias
225
-
* - "selectionSet" contains potential nested fields of this field/alias. The structure is recursive from here.
224
+
* - "args" contains the passed arguments for this field/alias (not on an union inline fragment)
225
+
* - "type" contains the related Type instance found (will be the same for all aliases of a field)
226
+
* - "selectionSet" contains potential nested fields of this field/alias (only on ObjectType). The structure is recursive from here.
227
+
* - "unions" contains potential object types contained in an UnionType (only on UnionType). The structure is recursive from here and will go through the selectionSet of the object types.
226
228
*
227
229
* Example:
228
230
* {
@@ -235,79 +237,107 @@ public function getFieldSelection(int $depth = 0): array
235
237
* alias1: nested {
236
238
* nested1(myArg: 2, mySecondAg: "test")
237
239
* }
240
+
* myUnion(myArg: 3) {
241
+
* ...on Nested {
242
+
* nested1(myArg: 4)
243
+
* }
244
+
* ...on MyCustomObject {
245
+
* nested3
246
+
* }
247
+
* }
238
248
* }
239
249
* }
240
250
*
241
-
* Given this ResolveInfo instance is a part of "root" field resolution, and $depth === 1,
251
+
* Given this ResolveInfo instance is a part of "root" field resolution, $depth === 1, and nested represent an ObjectType with a configured name "Nested",
0 commit comments