class GraphCreateProc extends CatalogProc {

    @Procedure(name = "gds.graph.create", mode = READ)
    @Description(DESCRIPTION)
    public Stream<GraphCreateNativeResult> create(
        @Name(value = "graphName") String graphName,
        @Name(value = "nodeProjection") @Nullable Object nodeProjection,
        @Name(value = "relationshipProjection") @Nullable Object relationshipProjection,
        @Name(value = "configuration", defaultValue = "{}") Map<String, Object> configuration
    ) {
        validateGraphName(username(), graphName);

        // input
        CypherMapWrapper cypherConfig = CypherMapWrapper.create(configuration);
        GraphCreateFromStoreConfig config = GraphCreateFromStoreConfig.of(
            username(),
            graphName,
            nodeProjection,
            relationshipProjection,
            cypherConfig
        );
        validateConfig(cypherConfig, config);

        // computation
        GraphCreateNativeResult result = runWithExceptionLogging(
            "Graph creation failed",
            () -> (GraphCreateNativeResult) createGraph(config)
        );
        // result
        return Stream.of(result);
    }

}