Pagination support in version 5.2.0 #744
ChopperlaAditya
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to implement pagination and tried by keeping generateParameterizedFieldsResolvers as false, but it didn't help me. We can see generated DTO's but
1.From where I can send the cursor value for pagination.
2.For DTO's we are using separate project and using this as dependency in another project, when kept field with parameter, GraphQL server is not starting and throwing below error :
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schemaParser' defined in class path resource [graphql/kickstart/tools/boot/GraphQLJavaToolsAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [graphql.kickstart.tools.SchemaParser]: Factory method 'schemaParser' threw exception; nested exception is graphql.kickstart.tools.FieldResolverError: No method found as defined in schema :18 with any of the following signatures (with or without one of [interface graphql.schema.DataFetchingEnvironment] as the last argument), in priority order:
com.xxx.xxx.service.query_resolver.EmpInfoGraphQLDtoResolver.observationHistory(com.xxx.xxx.service.models.EmpInfoGraphQLDto, ~cursor)
com.xxx.xxx.query_resolver.EmpInfoGraphQLDtoResolver.getObservationHistory(com.xxx.xxx.service.models.EmpInfoGraphQLDto, ~cursor)
com.xxx.xxx.models.EmpInfoGraphQLDto.observationHistory(~cursor)
com.xxx.xxx.models.EmpInfoGraphQLDto.getObservationHistory(~cursor)_
My GraphQL Schema
My code base
I have used version 5.2.0, if I'm missing any config or anything, can you let me know.
Beta Was this translation helpful? Give feedback.
All reactions