Class GraphQLRepositoryInvocationHandler<T>

java.lang.Object
com.graphql_java_generator.client.graphqlrepository.GraphQLRepositoryInvocationHandler<T>
All Implemented Interfaces:
InvocationHandler

public class GraphQLRepositoryInvocationHandler<T> extends Object implements InvocationHandler
This class is responsible to execute the method call to GraphQLRepository.
Author:
etienne-sf
  • Constructor Details

    • GraphQLRepositoryInvocationHandler

      public GraphQLRepositoryInvocationHandler(Class<T> repositoryInterface, org.springframework.context.ApplicationContext ctx) throws GraphQLRequestPreparationException
      Builds the instance from the given Spring ApplicationContext: it extracts the query, mutation and subscription executors that have been generated from the GraphQL schema. The mutation and subscription are optional in the GraphQL schema, so these two executors may be null.
      Note: when more than one GraphQL schema are used, a GraphQL Repository requests may be relative to only one GraphQL schema. The GraphQLRepositorys annotation must provide the queryExecutor of this GraphQL schema.
      This constructor can only be used on Spring applications, because of its ctx parameter.
      Parameters:
      repositoryInterface - The GraphQLRepository interface, that this InvocationHandler has to manage. It is mandatory.
      ctx - The Spring ApplicationContext that allows to retrieve the query, mutation and subscription executors
      Throws:
      GraphQLRequestPreparationException
  • Method Details