Skip to content

Commit 498a3fc

Browse files
roelofjan-elsingaMikk Mihkel Nurges
authored andcommitted
Fixed #145 (#150)
* Added "non_relation_field" to types with documentation * Changed "non_relation_field" to "is_relation" Whether the nested object is a relation is now an opt-out instead of an opt-in configuration. * Update SelectFields.php * Fixed #145, changed to ->config
1 parent 4be2acb commit 498a3fc

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

docs/advanced.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,6 @@ class UserType extends GraphQLType
919919
public function fields()
920920
{
921921
return [
922-
923922
// ...
924923

925924
// JSON column containing all posts made by this user
@@ -935,6 +934,5 @@ class UserType extends GraphQLType
935934
}
936935

937936
// ...
938-
939937
}
940938
```

src/Rebing/GraphQL/Support/SelectFields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ protected static function handleFields(array $requestedFields, $parentType, arra
139139
$customQuery = array_get($fieldObject->config, 'query');
140140

141141
// Check if the field is a relation that needs to be requested from the DB
142-
$queryable = self::isQueryable($fieldObject);
142+
$queryable = self::isQueryable($fieldObject->config);
143143

144144
// Pagination
145145
if(is_a($parentType, PaginationType::class))

0 commit comments

Comments
 (0)