Skip to content

Commit 6ba1283

Browse files
Add javadocs to 'BackendApplication', 'ErrorHandling'
1 parent 99fefdf commit 6ba1283

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

backend/src/main/java/de/itermori/pse/kitroomfinder/backend/BackendApplication.java

+11
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,22 @@
55
import org.springframework.boot.autoconfigure.SpringBootApplication;
66
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
77

8+
/**
9+
* The main class.
10+
*
11+
* @author Lukas Zetto
12+
* @author Adriano Castro
13+
* @version 1.0
14+
*/
815
@EnableEncryptableProperties
916
@EnableJpaRepositories(basePackages = "de.itermori.pse.kitroomfinder.backend.repositories")
1017
@SpringBootApplication()
1118
public class BackendApplication {
1219

20+
/**
21+
* The main method.
22+
* @param args The arguments.
23+
*/
1324
public static void main(String[] args) {
1425
SpringApplication.run(BackendApplication.class, args);
1526
}

backend/src/main/java/de/itermori/pse/kitroomfinder/backend/ErrorHandling.java

+14
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,21 @@
99
import java.util.List;
1010
import java.util.stream.Collectors;
1111

12+
/**
13+
* Handles GraphQL errors.
14+
*
15+
* @author Lukas Zetto
16+
* @version 1.0
17+
*/
1218
@Component
1319
public class ErrorHandling implements GraphQLErrorHandler {
20+
21+
/**
22+
* Processes GraphQL errors.
23+
*
24+
* @param errors The GraphQL errors.
25+
* @return The processed errors.
26+
*/
1427
@Override
1528
public List<GraphQLError> processErrors(List<GraphQLError> errors) {
1629
if (errors == null || errors.isEmpty()) {
@@ -28,4 +41,5 @@ private GraphQLError unwrapError(GraphQLError error) {
2841
} else
2942
return error;
3043
}
44+
3145
}

0 commit comments

Comments
 (0)