Class AbstractGraphQlResponse
java.lang.Object
org.springframework.graphql.support.AbstractGraphQlResponse
- All Implemented Interfaces:
GraphQlResponse
- Direct Known Subclasses:
DefaultExecutionGraphQlResponse
Base class for
GraphQlResponse
that pre-implements the ability to
access a ResponseField
.- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionNavigate to the given path under the "data" key of the response map where the path is a dot-separated string with optional array indexes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.graphql.GraphQlResponse
getData, getErrors, getExtensions, isValid, toMap
-
Constructor Details
-
AbstractGraphQlResponse
public AbstractGraphQlResponse()
-
-
Method Details
-
field
Description copied from interface:GraphQlResponse
Navigate to the given path under the "data" key of the response map where the path is a dot-separated string with optional array indexes.Example paths:
"hero" "hero.name" "hero.friends" "hero.friends[2]" "hero.friends[2].name"
- Specified by:
field
in interfaceGraphQlResponse
- Parameters:
path
- relative to the "data" key- Returns:
- representation for the field with further options to inspect or
decode its value; use
ResponseField.getValue()
to check if the field actually has a value.
-