Interface GraphQLRequests
@GraphQLRepository(queryExecutor=MyQueryTypeExecutorAllGraphQLCases.class)
public interface GraphQLRequests
This is a demo of the use of a
GraphQLRepository
. It contains the definition of GraphQL requests. Doing this
hides all the wiring to prepare and execute the GraphQL requests (query/mutation/subscription). Just declare a
GraphQLRequests
autowired bean in your Spring component, and you can execute GraphQL requests. Take a look at
the MinimalSpringApp
main class for that.- Author:
- etienne-sf
-
Method Summary
Modifier and TypeMethodDescriptioncreateHuman
(CINP_HumanInput_CINS input) withOneOptionalParam
(CINP_CharacterInput_CINS character)
-
Method Details
-
withoutParameters
@PartialRequest(request="{appearsIn name }") List<CIP_Character_CIS> withoutParameters() throws GraphQLRequestExecutionException- Throws:
GraphQLRequestExecutionException
-
withOneOptionalParam
@PartialRequest(request="{id appearsIn name}") CIP_Character_CIS withOneOptionalParam(CINP_CharacterInput_CINS character) throws GraphQLRequestExecutionException - Throws:
GraphQLRequestExecutionException
-
createHuman
@FullRequest(request="mutation {createHuman (human: &input) {id name} }", requestType=mutation) CTP_AnotherMutationType_CTS createHuman(@BindParameter(name="input") CINP_HumanInput_CINS input) throws GraphQLRequestExecutionException - Throws:
GraphQLRequestExecutionException
-