Skip to content

server_faq

etienne-sf edited this page Mar 27, 2021 · 15 revisions

Questions about the server configuration

HowTo to change the server port and path

The server is a Spring Boot app or servlet. It is configured through one of the application.properties or the application.yml files. It should be available in the root of the classpath, so you should provide is in the project's src/main/resources folder.

The below sample is based on the allGraphQLCases-server, available as a sample in the Maven and Gradle projects:

# Changing the port for the GraphQL server
server:
  port: 8180


# Changing the server path
graphql:
  url: /my/updated/graphql/path

HowTo configure OAuth2 for a GraphQL server

Everything is explained in the server OAuth2 page

HowTo configure Spring Security for a GraphQL server

You can find a sample, with the OAuth2 configuration, that includes configuring Spring Security beans.

Personalize your GraphQL server

Change the generated code (custom templates)

The generated code is created from Velocity templates. You can override any of these templates, according to your needs.

You'll find the needed info on the Custom Templates page.

Clone this wiki locally