Class GraphQLGenerator
java.lang.Object
org.brapi.schematools.core.graphql.GraphQLGenerator
Generates a GraphQL schema from a BrAPI Json Schema.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a GraphQLGenerator using a defaultBrAPISchemaReaderand the defaultGraphQLGeneratorOptions.GraphQLGenerator(GraphQLGeneratorOptions options) Creates a GraphQLGenerator using a defaultBrAPISchemaReaderand the providedGraphQLGeneratorOptions. -
Method Summary
Modifier and TypeMethodDescriptionResponse<graphql.schema.GraphQLSchema> Generates theGraphQLSchemafrom the complete BrAPI Specification in a directory contains a subdirectories for each module that contain the BrAPI Json schema and the additional subdirectories called 'Requests' that contains the request schemas and BrAPI-Common that contains common schemas for use across modules.Response<graphql.schema.GraphQLSchema> generate(Path schemaDirectory, GraphQLGeneratorMetadata metadata) Generates theGraphQLSchemafrom the complete BrAPI Specification in a directory contains a subdirectories for each module that contain the BrAPI Json schema and the additional subdirectories called 'Requests' that contains the request schemas and BrAPI-Common that contains common schemas for use across modules.
-
Constructor Details
-
GraphQLGenerator
public GraphQLGenerator()Creates a GraphQLGenerator using a defaultBrAPISchemaReaderand the defaultGraphQLGeneratorOptions. -
GraphQLGenerator
Creates a GraphQLGenerator using a defaultBrAPISchemaReaderand the providedGraphQLGeneratorOptions.- Parameters:
options- The options to be used in the generation.
-
-
Method Details
-
generate
Generates theGraphQLSchemafrom the complete BrAPI Specification in a directory contains a subdirectories for each module that contain the BrAPI Json schema and the additional subdirectories called 'Requests' that contains the request schemas and BrAPI-Common that contains common schemas for use across modules.- Parameters:
schemaDirectory- the path to the complete BrAPI Specification- Returns:
- the
GraphQLSchemafrom the complete BrAPI Specification
-
generate
public Response<graphql.schema.GraphQLSchema> generate(Path schemaDirectory, GraphQLGeneratorMetadata metadata) Generates theGraphQLSchemafrom the complete BrAPI Specification in a directory contains a subdirectories for each module that contain the BrAPI Json schema and the additional subdirectories called 'Requests' that contains the request schemas and BrAPI-Common that contains common schemas for use across modules.- Parameters:
schemaDirectory- the path to the complete BrAPI Specificationmetadata- additional metadata that is used in the generation- Returns:
- the
GraphQLSchemafrom the complete BrAPI Specification
-