Interface GraphQLRepositoryTestCase
This interface contains the test cases for the
GraphQLRepositoryInvocationHandler
tests- Author:
- etienne-sf
-
Method Summary
Modifier and TypeMethodDescriptioncreateHuman
(HumanInput character) Mutation: without requestNamefullRequest1
(boolean uppercase, String value) Full request: queryfullRequest2
(String value, boolean uppercase) Full request: query, with queryTypefullRequestMutation
(HumanInput humanInput) Full request: mutationfullSubscription
(SubscriptionCallback<Date> callback, Date date) Full request: subscriptionsubscribeNewHumanForEpisode
(SubscriptionCallback<Human> subscriptionCallback, Episode episode) SubscriptionthisIsAMutation
(HumanInput character) Mutation: with requestNamethisIsNotARequestName1
(CharacterInput character) with requestName: the method name is freethisIsNotARequestName2
(CharacterInput character) with requestName: the method name is freethisIsNotARequestName3
(AllFieldCasesInput input, long nbItems, FieldParameterInput fieldParameterInput) with requestName (the method name is free) and bind parameter valueswithBooleanParam
(boolean bool) A query with a boolean parameterwithDoubleParamAndReturnType
(double f) A query with a float parameter (GraphQL Float actually maps to Java Double, but Java Float and float should be accepted here)withIntParamAndReturnType
(int intParam) A query with an Integer parameterwithListParam
(List<List<Float>> matrix) A query with aList
parameterwithOneOptionalParam
(CharacterInput character) no requestName: the method name is the field name of the query type in the GraphQL schema
-
Method Details
-
withOneOptionalParam
@PartialRequest(request="{appearsIn name}") Character withOneOptionalParam(CharacterInput character) throws GraphQLRequestExecutionException no requestName: the method name is the field name of the query type in the GraphQL schema- Throws:
GraphQLRequestExecutionException
-
thisIsNotARequestName1
@PartialRequest(requestName="withOneOptionalParam", request="{appearsIn name id}") Character thisIsNotARequestName1(CharacterInput character) throws GraphQLRequestExecutionException with requestName: the method name is free- Throws:
GraphQLRequestExecutionException
-
thisIsNotARequestName2
@PartialRequest(requestName="withOneOptionalParam", request="{id name appearsIn}") Character thisIsNotARequestName2(CharacterInput character) throws GraphQLRequestExecutionException with requestName: the method name is free- Throws:
GraphQLRequestExecutionException
-
thisIsNotARequestName3
@PartialRequest(requestName="allFieldCases", request="{listWithoutIdSubTypes(nbItems: &nbItemsParam, input:?fieldParameterInput)}") AllFieldCases thisIsNotARequestName3(AllFieldCasesInput input, @BindParameter(name="nbItemsParam") long nbItems, @BindParameter(name="fieldParameterInput") FieldParameterInput fieldParameterInput) throws GraphQLRequestExecutionException with requestName (the method name is free) and bind parameter values- Throws:
GraphQLRequestExecutionException
-
withIntParamAndReturnType
@PartialRequest(requestName="withOneMandatoryParamDefaultValue", request="") Integer withIntParamAndReturnType(int intParam) throws GraphQLRequestExecutionException A query with an Integer parameter- Throws:
GraphQLRequestExecutionException
-
withDoubleParamAndReturnType
@PartialRequest(requestName="issue82Float", request="") Double withDoubleParamAndReturnType(double f) throws GraphQLRequestExecutionException A query with a float parameter (GraphQL Float actually maps to Java Double, but Java Float and float should be accepted here)- Throws:
GraphQLRequestExecutionException
-
withBooleanParam
@PartialRequest(requestName="directiveOnQuery", request="") List<String> withBooleanParam(boolean bool) throws GraphQLRequestExecutionException A query with a boolean parameter- Throws:
GraphQLRequestExecutionException
-
withListParam
@PartialRequest(requestName="withListOfList", request="") AllFieldCases withListParam(List<List<Float>> matrix) throws GraphQLRequestExecutionException A query with aList
parameter- Throws:
GraphQLRequestExecutionException
-
createHuman
@PartialRequest(request="{id}", requestType=mutation) Human createHuman(HumanInput character) throws GraphQLRequestExecutionException Mutation: without requestName- Throws:
GraphQLRequestExecutionException
-
thisIsAMutation
@PartialRequest(requestName="createHuman", request="{id name}", requestType=mutation) Human thisIsAMutation(HumanInput character) throws GraphQLRequestExecutionException Mutation: with requestName- Throws:
GraphQLRequestExecutionException
-
subscribeNewHumanForEpisode
@PartialRequest(request="{ id appearsIn }", requestType=subscription) SubscriptionClient subscribeNewHumanForEpisode(SubscriptionCallback<Human> subscriptionCallback, Episode episode) throws GraphQLRequestExecutionException Subscription- Throws:
GraphQLRequestExecutionException
-
fullRequest1
@FullRequest(request="{directiveOnQuery (uppercase: ?uppercase) @testDirective(value:&valueParam)}") MyQueryType fullRequest1(@BindParameter(name="uppercase") boolean uppercase, @BindParameter(name="valueParam") String value) throws GraphQLRequestExecutionException Full request: query- Throws:
GraphQLRequestExecutionException
-
fullRequest2
@FullRequest(request="{directiveOnQuery (uppercase: ?uppercase) @testDirective(value:&valueParam)}", requestType=query) MyQueryType fullRequest2(@BindParameter(name="valueParam") String value, @BindParameter(name="uppercase") boolean uppercase) throws GraphQLRequestExecutionException Full request: query, with queryType- Throws:
GraphQLRequestExecutionException
-
fullRequestMutation
@FullRequest(request="mutation($input: HumanInput!) {createHuman(human: $input) {id name }}", requestType=mutation) AnotherMutationType fullRequestMutation(@BindParameter(name="input") HumanInput humanInput) throws GraphQLRequestExecutionException Full request: mutation- Throws:
GraphQLRequestExecutionException
-
fullSubscription
@FullRequest(request="subscription {issue53(date: &date) {}}", requestType=subscription) SubscriptionClient fullSubscription(SubscriptionCallback<Date> callback, @BindParameter(name="date") Date date) throws GraphQLRequestExecutionException Full request: subscription- Throws:
GraphQLRequestExecutionException
-