Class AbstractDelegatingGraphQlTester

java.lang.Object
org.springframework.graphql.test.tester.AbstractDelegatingGraphQlTester
All Implemented Interfaces:
GraphQlTester

public abstract class AbstractDelegatingGraphQlTester extends Object implements GraphQlTester
Base class for extensions of GraphQlTester that mainly assist with building the underlying transport, but otherwise delegate to the default GraphQlTester implementation for actual request execution.

Subclasses must implement GraphQlTester.mutate() to allow mutation of both GraphQlTester and GraphQlTransport configuration.

Since:
1.0.0
Author:
Rossen Stoyanchev
See Also:
  • Constructor Details

    • AbstractDelegatingGraphQlTester

      protected AbstractDelegatingGraphQlTester(GraphQlTester delegate)
  • Method Details

    • document

      public GraphQlTester.Request<?> document(String document)
      Description copied from interface: GraphQlTester
      Start defining a GraphQL request with the given document, which is the textual representation of an operation (or operations) to perform, including selection sets and fragments.
      Specified by:
      document in interface GraphQlTester
      Parameters:
      document - the document for the request
      Returns:
      spec for response assertions
    • documentName

      public GraphQlTester.Request<?> documentName(String documentName)
      Description copied from interface: GraphQlTester
      Variant of GraphQlTester.document(String) that uses the given key to resolve the GraphQL document from a file with the help of the configured DocumentSource.
      Specified by:
      documentName in interface GraphQlTester
      Parameters:
      documentName - the name of the document to send
      Returns:
      spec for response assertions