You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b84c156
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: src/main/java/graphql/ExecutionResult.java
+22Lines changed: 22 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,34 @@
2
2
3
3
4
4
importjava.util.List;
5
+
importjava.util.Map;
5
6
7
+
/**
8
+
* This simple value class represents the result of performing a graphql query.
9
+
*/
6
10
@PublicApi
7
11
publicinterfaceExecutionResult {
8
12
13
+
/**
14
+
* @param <T> allows type coercion
15
+
*
16
+
* @return the data in the result or null if there is none
17
+
*/
9
18
<T> TgetData();
10
19
20
+
/**
21
+
* @return the errors that occurred during execution or empty list if there is none
22
+
*/
11
23
List<GraphQLError> getErrors();
12
24
25
+
/**
26
+
* The graphql specification says that result of a call should be a map that follows certain rules on what items
27
+
* should be present. Certain JSON serializers may or may interpret {@link ExecutionResult} to spec, so this method
28
+
* is provided to produce a map that strictly follows the specification.
29
+
*
30
+
* See : <a href="http://facebook.github.io/graphql/#sec-Response-Format">http://facebook.github.io/graphql/#sec-Response-Format">http://facebook.github.io/graphql/#sec-Response-Format</a>
31
+
*
32
+
* @return a map of the result that strictly follows the spec
0 commit comments