Class AbstractGraphQlResponse

java.lang.Object
org.springframework.graphql.support.AbstractGraphQlResponse
All Implemented Interfaces:
GraphQlResponse
Direct Known Subclasses:
DefaultExecutionGraphQlResponse

public abstract class AbstractGraphQlResponse extends Object implements GraphQlResponse
Base class for GraphQlResponse that pre-implements the ability to access a ResponseField.
Since:
1.0.0
Author:
Rossen Stoyanchev
  • Constructor Details

    • AbstractGraphQlResponse

      public AbstractGraphQlResponse()
  • Method Details

    • field

      public ResponseField field(String path)
      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 interface GraphQlResponse
      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.