Skip to content

Commit 5493107

Browse files
committed
More coverage
1 parent 3f294ec commit 5493107

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/GraphQl/Type/FieldsBuilderTest.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,27 @@ public function collectionQueryFieldsProvider(): array
325325
],
326326
],
327327
],
328+
'collection with page-based pagination enabled' => ['resourceClass', (new ResourceMetadata('ShortName', null, null, null, null, ['paginationType' => 'page']))->withGraphql(['action' => ['filters' => ['my_filter']]]), 'action', [], $graphqlType = GraphQLType::listOf(new ObjectType(['name' => 'collection'])), $resolver = function () {
329+
},
330+
[
331+
'actionShortNames' => [
332+
'type' => $graphqlType,
333+
'description' => null,
334+
'args' => [
335+
'page' => [
336+
'type' => GraphQLType::int(),
337+
'description' => 'The current page.',
338+
],
339+
'boolField' => $graphqlType,
340+
'boolField_list' => GraphQLType::listOf($graphqlType),
341+
'parent__child' => new InputObjectType(['name' => 'ShortNameFilter_parent__child', 'fields' => ['related__nested' => $graphqlType]]),
342+
'dateField' => new InputObjectType(['name' => 'ShortNameFilter_dateField', 'fields' => ['before' => $graphqlType]]),
343+
],
344+
'resolve' => $resolver,
345+
'deprecationReason' => '',
346+
],
347+
],
348+
],
328349
];
329350
}
330351

0 commit comments

Comments
 (0)