com.introproventures.graphql.jpa.query.schema.relay.GraphQLJpaRelayDataFetcher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphql-jpa-query-schema Show documentation
Show all versions of graphql-jpa-query-schema Show documentation
Provides GraphQL JPA Query Schema Generation and Execution Support
The newest version!
package com.introproventures.graphql.jpa.query.schema.relay;
import static com.introproventures.graphql.jpa.query.support.GraphQLSupport.getSelectionField;
import static com.introproventures.graphql.jpa.query.support.GraphQLSupport.searchByFieldName;
import com.introproventures.graphql.jpa.query.schema.impl.GraphQLJpaQueryFactory;
import com.introproventures.graphql.jpa.query.schema.impl.PagedResult;
import graphql.language.Field;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class GraphQLJpaRelayDataFetcher implements DataFetcher> {
private static final Logger logger = LoggerFactory.getLogger(GraphQLJpaRelayDataFetcher.class);
private static final String EDGES = "edges";
private static final String FIRST = "first";
private static final String AFTER = "after";
private static final String PAGE_INFO = "pageInfo";
private final int defaultMaxResults;
private final int defaultFirstSize;
private final boolean enableDefaultMaxResults;
private final GraphQLJpaQueryFactory queryFactory;
private GraphQLJpaRelayDataFetcher(Builder builder) {
this.queryFactory = builder.queryFactory;
this.defaultMaxResults = builder.defaultMaxResults;
this.defaultFirstSize = builder.defaultFirstSize;
this.enableDefaultMaxResults = builder.enableDefaultMaxResults;
}
@Override
public Page
© 2015 - 2025 Weber Informatics LLC | Privacy Policy