PrintSchemaIntegTestAbstract

Utility to print out the schema, to src/test/resources of the implementing subclass.

IDEs can then detect this and use it to provide intellisense/code-completion for GraphQL queries, eg used by tests.

If the org.apache.causeway.core.config.CausewayConfiguration.Viewer.Graphql.ApiVariant ApiVariant is to be overridden from the framework’s default, use for example Spring’s @ DynamicPropertySource annotation.

For example:

import static org.apache.causeway.core.config.CausewayConfiguration.Viewer.Graphql;

public class PrintSchemaIntegTest extends PrintSchemaIntegTestAbstract {
    _@_ DynamicPropertySource
    static void apiVariant(DynamicPropertyRegistry registry) {
        registry.add(
             "causeway.viewer.graphql.api-variant",
             Graphql.ApiVariant.QUERY_WITH_MUTATIONS_NON_SPEC_COMPLIANT::name);
    }
}

API

PrintSchemaIntegTestAbstract.java
class PrintSchemaIntegTestAbstract {
  PrintSchemaIntegTestAbstract()
}