-
Notifications
You must be signed in to change notification settings - Fork 50
client_personalization
- Client app personalization
- Use the plugin parameters
- [Spring app] provide Spring beans
- [Deprecated] Use a preconfigured Jersey client
- Use your own code templates
This page explains how to change the default plugin behavior, and adapt it to your needs.
You can configure several things, from the pom.xml or build.gradle files.
You'll find all the available parameters on the plugin web site.
As explained on the Client Spring page, the GraphQL plugin defines an auto-configuration class, that provides default Spring beans. And the whole system is built as a Spring Boot app.
So, you can personalize the plugin behavior by:
- Define the proper properties in the application.properties or application.yml spring configuration file
- Define Spring bean, that can override:
- the beans defined in the GraphQL plugin's auto-configuration class. Take a look at the Client Spring page for more information.
- the beans defined by Sprint Boot. You'll find lots of documentation about this on the net.
If you don't use the Spring app, you can use a preconfigured Jersey client instance to support customization of the rest request:
public QueryTypeExecutor(String graphqlEndpoint, Client client, ObjectMapper objectMapper)
The plugin generates the code, from a Velocity templates. You can override the provided templates.
Please take a look at the custom templates doc for all the details.
Creating a first app (non spring)
Connect to more than one GraphQL servers
Easily execute GraphQL requests with GraphQL Repositories
Access to an OAuth2 GraphQL server
How to personalize the client app
Howto personalize the generated code
Client migration from 1.x to 2.x
Implement an OAuth2 GraphQL server
Howto personalize the generated code
Server migration from 1.x to 2.x