Interface GraphQlTester.Builder<B extends GraphQlTester.Builder<B>>

Type Parameters:
B - the type of builder
All Known Subinterfaces:
ExecutionGraphQlServiceTester.Builder<B>, HttpGraphQlTester.Builder<B>, RSocketGraphQlTester.Builder<B>, WebGraphQlTester.Builder<B>, WebSocketGraphQlTester.Builder<B>
All Known Implementing Classes:
AbstractGraphQlTesterBuilder, DefaultRSocketGraphQlTesterBuilder
Enclosing interface:
GraphQlTester

public static interface GraphQlTester.Builder<B extends GraphQlTester.Builder<B>>
A builder to create a GraphQlTester instance.
  • Method Details

    • errorFilter

      B errorFilter(Predicate<org.springframework.graphql.ResponseError> predicate)
      Configure a global filter that applies to all requests.
      Parameters:
      predicate - the error filter to add
      Returns:
      the same builder instance
    • documentSource

      B documentSource(org.springframework.graphql.support.DocumentSource contentLoader)
      Configure a DocumentSource for use with GraphQlTester.documentName(String) for resolving a document by name.

      By default, this is set to ResourceDocumentSource with classpath location "graphql-test/" and ResourceDocumentSource.FILE_EXTENSIONS as extensions.

      Parameters:
      contentLoader - the document content loader
    • responseTimeout

      B responseTimeout(Duration timeout)
      Max amount of time to wait for a GraphQL response.

      By default this is set to 5 seconds.

      Parameters:
      timeout - the response timeout value
    • build

      GraphQlTester build()
      Build the GraphQlTester.
      Returns:
      the created instance