Skip to content

fix(graphql): operation with disabled pagination #4930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

webda2l
Copy link
Contributor

@webda2l webda2l commented Sep 8, 2022

Q A
Branch? 2.7
Tickets #4613 (comment) & #4613 (comment)
License MIT
Doc PR api-platform/docs#...
  • Add tests

@@ -522,7 +522,10 @@ private function convertType(Type $type, bool $input, Operation $rootOperation,
}

if ($this->typeBuilder->isCollection($type)) {
return $this->pagination->isGraphQlEnabled($rootOperation) && !$input ? $this->typeBuilder->getResourcePaginatedCollectionType($graphqlType, $resourceClass, $rootOperation) : GraphQLType::listOf($graphqlType);
$resourceMetadataCollection = $this->resourceMetadataCollectionFactory->create($resourceClass);
$resolverOperation = $resourceMetadataCollection->getOperation(null, true, false, true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't you use an operation name instead of adding a flag?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? Not sure to understand your point sorry.

@alanpoulain
Copy link
Member

Superseded by #5112.

@alanpoulain alanpoulain closed this Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants