Interface GraphQlTester.Traversable
- All Known Subinterfaces:
GraphQlTester.Entity<D,
,S> GraphQlTester.EntityList<E>
,GraphQlTester.Path
,GraphQlTester.Response
- Enclosing interface:
- GraphQlTester
public static interface GraphQlTester.Traversable
Declare options to switch to different part of the GraphQL response.
-
Method Summary
Modifier and TypeMethodDescriptionNavigate to a path under the "data" section of the GraphQL response.path
(String path, Consumer<GraphQlTester.Path> pathConsumer) Variant ofpath(String)
with a callback that allows inspecting multiple paths under the given path.
-
Method Details
-
path
Navigate to a path under the "data" section of the GraphQL response. This could be an operation root type name, e.g. "project", or any JsonPath.- Parameters:
path
- the path to navigate to- Returns:
- spec with further options at the given path
- Throws:
AssertionError
- if the GraphQL response contains errors that have not been checked viaGraphQlTester.Response.errors()
-
path
Variant ofpath(String)
with a callback that allows inspecting multiple paths under the given path.- Parameters:
path
- the path to navigate topathConsumer
- callback with aGraphQlTester.Path
that uses the current path as a base path such that any further navigation through thisGraphQlTester.Path
is relative to the current path.- Returns:
- spec with further options at the given path
- Since:
- 1.2
-