Class KobbySchemaExtension

  • All Implemented Interfaces:

    
    public class KobbySchemaExtension
    
                        

    Schema location and parsing rules configuration

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private FileCollection files
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

      • KobbySchemaExtension

        KobbySchemaExtension()
    • Method Detail

      • getFiles

         final FileCollection getFiles()

        GraphQL schema files to generate Kobby DSL.

        By default, all "**/*.graphqls" files in "src/main/resources"

      • setFiles

         final Unit setFiles(FileCollection files)

        GraphQL schema files to generate Kobby DSL.

        By default, all "**/*.graphqls" files in "src/main/resources"

      • truncate

         final Unit truncate(Action<KobbySchemaTruncateExtension> action)

        GraphQL schema truncation configuration. This mechanism provides the ability to truncate the GraphQL schema before code generation.

        Schema truncation occurs in two stages:

        • The first stage removes all fields from GraphQL types that match the query.

        • The second stage removes all GraphQL types from the schema that are not accessible from the schema root (Query, Mutation or Subscription types).

      • analyze

         final Unit analyze(Action<KobbySchemaAnalyzeExtension> action)

        kobbySchemaAnalyze task configuration.

        This task prints a report to the console with all GraphQL types and fields that match the query. To run task use:

        gradle kobbySchemaAnalyze