diff --git a/references/api-schema.md b/references/api-schema.md index 3823e2b1..cefb8f9e 100644 --- a/references/api-schema.md +++ b/references/api-schema.md @@ -2,287 +2,337 @@ ## Query -| Field | Description | -| ---- | ---- | -| **accessTokens** : [AccessTokenView!]! | | -| **activeRecipeRuns** : [RecipeRun!]! | Get all currently active recipe runs by a user id (passed via header) sorted by most recent
**Arguments** | -| **category** : RecipeCategory! | Returns a single category with associated `recipes` and `subCategories`
**Arguments** | -| **findRecipes** : [Recipe!]! | Search for recipes by `query`
**Arguments** | -| **githubAppInstallationRepositories** : [GithubAppInstallationRepository!]! | | -| **githubAppInstallations** : [GithubAppInstallation!]! | | -| **githubOrganizations** : [GithubOrganization!]! | Github Organizations the user belong to, includes public and private
**Arguments** | -| **githubRepositories** : [GithubRepository!]! | Github Repositories owned by the user directly, not an organization | -| **previousRecipeRuns** : [RecipeRun!]! | Get all recipe runs by a user id (passed via header) sorted by most recent
**Arguments** | -| **recipe** : Recipe! | Look up single recipe record by `id` \n
Example: id: `org.openrewrite.java.testing.junit5.IgnoreToDisabled`
**Arguments** | -| **recipeArtifacts** : [RecipeArtifact!]! | Return all loaded recipe artifacts | -| **recipeRun** : RecipeRun! | | -| **recipeRunResults** : RecipeRunResultsByRepository! | This query is only apart of MRE for the purposes of schema composition
Queries will be handled directly by a worker.
**Arguments** | -| **recipeRunResultsByRepository** : ResultConnection! | This query is only apart of MRE for the purposes of schema composition
Queries will be handled directly by a worker.
**Arguments** | -| **recipeRunSummaryByRepository** : RecipeRunSummary! | | -| **recipes** ⚠️: [Recipe!]! | Returns multiple recipes matching the list of strings provided
@Deprecated -- use recipe(id) instead

use `recipe(id)` instead


**Arguments** | -| **repository** : Repository! | This query is only apart of MRE for the purposes of schema composition
Queries will be handled directly by a worker.
**Arguments** | -| **repositoryIndex** : [RepositoryIndexItem!] | Returns the list of known repository identifiers | -| **worker** : Worker | Look up worker by name
**Arguments** | -| **workers** : [Worker!]! | Return all known workers | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **accessTokens** | | [AccessTokenView!]! | | +| **activeRecipeRuns** | | [RecipeRun!]! | Get all currently active recipe runs by a user id (passed via header) sorted by most recent | + | | `limit` | Int | | + | | `sortOrder` | SortOrder | | +| **category** | | RecipeCategory! | Returns a single category with associated `recipes` and `subCategories` | + | | `categoryId` | ID! | | +| **findRecipes** | | [Recipe!]! | Search for recipes by `query` | + | | `query` | String! | | +| **githubAppInstallationRepositories** | | [GithubAppInstallationRepository!]! | | + | | `installationId` | ID! | | +| **githubAppInstallations** | | [GithubAppInstallation!]! | | +| **githubOrganizations** | | [GithubOrganization!]! | Github Organizations the user belong to, includes public and private | + | | `name` | String | Optional name to filter user's organizations by | +| **githubRepositories** | | [GithubRepository!]! | Github Repositories owned by the user directly, not an organization | +| **previousRecipeRuns** | | [RecipeRun!]! | Get all recipe runs by a user id (passed via header) sorted by most recent | + | | `limit` | Int | | + | | `sortOrder` | SortOrder | | +| **recipe** | | Recipe! | Look up single recipe record by `id` \n
Example: id: `org.openrewrite.java.testing.junit5.IgnoreToDisabled` | + | | `id` | ID! | | +| **recipeArtifacts** | | [RecipeArtifact!]! | Return all loaded recipe artifacts | +| **recipeRun** | | RecipeRun! | | + | | `id` | ID! | | +| **recipeRunResults** | | RecipeRunResultsByRepository! | This query is only apart of MRE for the purposes of schema composition
Queries will be handled directly by a worker. | + | | `after` | String | | + | | `first` | Int | | + | | `id` | ID! | | + | | `repositoryId` | ID! | | +| **recipeRunResultsByRepository** | | ResultConnection! | This query is only apart of MRE for the purposes of schema composition
Queries will be handled directly by a worker. | + | | `after` | String | | + | | `first` | Int | | + | | `id` | ID! | Run ID | + | | `query` | String | | + | | `repositoryId` | ID! | Example: `Netflix:eureka` | +| **recipeRunSummaryByRepository** | | RecipeRunSummary! | | + | | `id` | ID! | Recipe Run ID | + | | `repositoryId` | ID! | Example: `Netflix:eureka` | +| **recipes** ⚠️ | | [Recipe!]! | Returns multiple recipes matching the list of strings provided
@Deprecated -- use recipe(id) instead

use `recipe(id)` instead

| + | | `names` | [String!]! | | +| **repository** | | Repository! | This query is only apart of MRE for the purposes of schema composition
Queries will be handled directly by a worker. | + | | `id` | ID! | | +| **repositoryIndex** | | [RepositoryIndexItem!] | Returns the list of known repository identifiers | +| **worker** | | Worker | Look up worker by name | + | | `name` | String! | | +| **workers** | | [Worker!]! | Return all known workers | ## Mutation -| Field | Description | -| ---- | ---- | -| **addIngestToGithubRepository** : String! | | -| **cancelRecipeRun** : ID! | | -| **commitToBranch** : BranchResponse! | | -| **createAccessToken** : String! | | -| **createBranchFromResult** : BranchResponse! | | -| **deleteAccessToken** : Boolean! | | -| **loadRecipes** : RecipeArtifact | | -| **runRecipe** : RecipeRun! | | -| **runYamlRecipe** : RecipeRun! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **addIngestToGithubRepository** | | String! | | + | | `installationId` | String! | | + | | `repositoryName` | String! | | + | | `repositoryOwner` | String! | | +| **cancelRecipeRun** | | ID! | | + | | `id` | ID! | | +| **commitToBranch** | | BranchResponse! | | + | | `branchName` | String! | | + | | `commit` | String! | | + | | `commitMessage` | String! | | + | | `recipeRunId` | ID! | | + | | `repositoryId` | ID! | | + | | `resultsLink` | String! | | +| **createAccessToken** | | String! | | + | | `description` | String | | +| **createBranchFromResult** | | BranchResponse! | | + | | `branchName` | String! | | + | | `commit` | String! | | + | | `commitMessage` | String! | | + | | `fork` | Boolean! | | + | | `recipeRunId` | ID! | | + | | `repositoryId` | ID! | | + | | `resultsLink` | String! | | +| **deleteAccessToken** | | Boolean! | | + | | `id` | ID! | | +| **loadRecipes** | | RecipeArtifact | | + | | `artifactId` | String! | | + | | `datedSnapshotVersion` | String | | + | | `groupId` | String! | | + | | `version` | String! | | +| **runRecipe** | | RecipeRun! | | + | | `run` | RecipeRunInput! | | +| **runYamlRecipe** | | RecipeRun! | | + | | `repositoryFilter` | [ID!] | | + | | `yaml` | String! | | ## Objects ### AccessTokenView -| Field | Description | -| ---- | ---- | -| **created** : DateTime! | | -| **description** : String | | -| **id** : ID! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **created** | | DateTime! | | +| **description** | | String | | +| **id** | | ID! | | ### BranchResponse -| Field | Description | -| ---- | ---- | -| **branchName** : String! | | -| **commit** : String! | Commit SHA | -| **repository** : GithubRepository! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **branchName** | | String! | | +| **commit** | | String! | Commit SHA | +| **repository** | | GithubRepository! | | ### Commit -| Field | Description | -| ---- | ---- | -| **branch** : String! | | -| **changeset** : String! | Git SHA | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **branch** | | String! | | +| **changeset** | | String! | Git SHA | ### GithubAppInstallation -| Field | Description | -| ---- | ---- | -| **accountLogin** : String! | | -| **accountType** : GithubAccountType! | | -| **id** : ID! | | -| **repositories** : [GithubAppInstallationRepository!]! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **accountLogin** | | String! | | +| **accountType** | | GithubAccountType! | | +| **id** | | ID! | | +| **repositories** | | [GithubAppInstallationRepository!]! | | ### GithubAppInstallationRepository -| Field | Description | -| ---- | ---- | -| **hasWorkflowInstalled** : Boolean! | | -| **isWorkflowRunInProgress** : Boolean! | | -| **lastWorkflowRunAt** : DateTime | | -| **repository** : GithubRepository! | | -| **wasLastWorkflowRunSuccessful** : Boolean | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **hasWorkflowInstalled** | | Boolean! | | +| **isWorkflowRunInProgress** | | Boolean! | | +| **lastWorkflowRunAt** | | DateTime | | +| **repository** | | GithubRepository! | | +| **wasLastWorkflowRunSuccessful** | | Boolean | | ### GithubOrganization -| Field | Description | -| ---- | ---- | -| **id** : ID! | | -| **name** : String! | | -| **repositories** : [GithubRepository!]! | | -| **url** : String! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **id** | | ID! | | +| **name** | | String! | | +| **repositories** | | [GithubRepository!]! | | +| **url** | | String! | | ### GithubRepository -| Field | Description | -| ---- | ---- | -| **defaultBranch** : String! | | -| **fullName** : String! | | -| **id** : ID! | | -| **name** : String! | | -| **privateRepo** : Boolean! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **defaultBranch** | | String! | | +| **fullName** | | String! | | +| **id** | | ID! | | +| **name** | | String! | | +| **privateRepo** | | Boolean! | | ### GithubUserAccessTokenResponse -| Field | Description | -| ---- | ---- | -| **accessToken** : String! | | -| **refreshToken** : String! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **accessToken** | | String! | | +| **refreshToken** | | String! | | ### Option -| Field | Description | -| ---- | ---- | -| **description** : String! | | -| **displayName** : String! | | -| **example** : String | | -| **name** : String! | | -| **required** : Boolean! | | -| **type** : String! | | -| **valid** : [String] | | -| **value** : Object | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **description** | | String! | | +| **displayName** | | String! | | +| **example** | | String | | +| **name** | | String! | | +| **required** | | Boolean! | | +| **type** | | String! | | +| **valid** | | [String] | | +| **value** | | Object | | ### Organization -| Field | Description | -| ---- | ---- | -| **id** : ID! | | -| **name** : String! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **id** | | ID! | | +| **name** | | String! | | ### Page -| Field | Description | -| ---- | ---- | -| **endCursor** : String! | | -| **hasNextPage** : Boolean! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **endCursor** | | String! | | +| **hasNextPage** | | Boolean! | | ### Recipe -| Field | Description | -| ---- | ---- | -| **description** : String | Note: May contain markdown formatting
@markdown | -| **id** : ID! | Example: `org.openrewrite.java.testing.junit5.IgnoreToDisabled` | -| **languages** : [String!]! | | -| **name** : String! | Note: May contain markdown formatting
@markdown | -| **options** : [Option!]! | | -| **recipeArtifact** : RecipeArtifact | | -| **recipeList** : [Recipe!]! | | -| **tags** : [String!]! | | -| **totalRecipes** : Int! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **description** | | String | Note: May contain markdown formatting
@markdown | +| **id** | | ID! | Example: `org.openrewrite.java.testing.junit5.IgnoreToDisabled` | +| **languages** | | [String!]! | | +| **name** | | String! | Note: May contain markdown formatting
@markdown | +| **options** | | [Option!]! | | +| **recipeArtifact** | | RecipeArtifact | | +| **recipeList** | | [Recipe!]! | | +| **tags** | | [String!]! | | +| **totalRecipes** | | Int! | | ### RecipeArtifact -| Field | Description | -| ---- | ---- | -| **artifactId** : String! | | -| **datedSnapshotVersion** : String | | -| **groupId** : String! | | -| **repositoryUrl** : String | | -| **requestedVersion** : String! | | -| **snapshotTime** : DateTime | The time from datedSnapshotVersion extracted into a DateTime
for human readable presentation in time zones other than UTC | -| **version** : String! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **artifactId** | | String! | | +| **datedSnapshotVersion** | | String | | +| **groupId** | | String! | | +| **repositoryUrl** | | String | | +| **requestedVersion** | | String! | | +| **snapshotTime** | | DateTime | The time from datedSnapshotVersion extracted into a DateTime
for human readable presentation in time zones other than UTC | +| **version** | | String! | | ### RecipeCategory -| Field | Description | -| ---- | ---- | -| **breadcrumbs** : [RecipeCategoryBreadcrumb!]! | | -| **description** : String | @markdown | -| **id** : ID! | | -| **name** : String! | Captialization handled in services.
Text transformation by client not required
@markdown | -| **recipes** : [Recipe!]! | | -| **subCategories** : [RecipeCategory!]! | Sorted alphabetically by `RecipeCategory.name` | -| **tags** : [String!]! | | -| **totalRecipeCount** : Int! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **breadcrumbs** | | [RecipeCategoryBreadcrumb!]! | | +| **description** | | String | @markdown | +| **id** | | ID! | | +| **name** | | String! | Captialization handled in services.
Text transformation by client not required
@markdown | +| **recipes** | | [Recipe!]! | | +| **subCategories** | | [RecipeCategory!]! | Sorted alphabetically by `RecipeCategory.name` | +| **tags** | | [String!]! | | +| **totalRecipeCount** | | Int! | | ### RecipeCategoryBreadcrumb -| Field | Description | -| ---- | ---- | -| **id** : ID! | | -| **name** : String! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **id** | | ID! | | +| **name** | | String! | | ### RecipeRun -| Field | Description | -| ---- | ---- | -| **id** : ID! | | -| **recipe** : Recipe! | | -| **repositoryFilter** : [ID!]! | | -| **start** : DateTime! | | -| **state** : RecipeRunState! | | -| **summaryResults** : [RecipeRunSummary!]! | Sorted alphabetically by Repository ID | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **id** | | ID! | | +| **recipe** | | Recipe! | | +| **repositoryFilter** | | [ID!]! | | +| **start** | | DateTime! | | +| **state** | | RecipeRunState! | | +| **summaryResults** | | [RecipeRunSummary!]! | Sorted alphabetically by Repository ID | ### RecipeRunResultsByRepository -| Field | Description | -| ---- | ---- | -| **commit** : Commit! | | -| **patchLink** : String | | -| **results** : ResultConnection! | | -| **totalResults** : Int! | | -| **totalSearched** : Int! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **commit** | | Commit! | | +| **patchLink** | | String | | +| **results** | | ResultConnection! | | +| **totalResults** | | Int! | | +| **totalSearched** | | Int! | | ### RecipeRunSummary -| Field | Description | -| ---- | ---- | -| **commit** : Commit! | | -| **lastUpdated** : DateTime! | | -| **repositoryId** : ID! | | -| **resultsLink** : String | The GraphQL endpoint that you can execute a RecipeRunResultsByRepository.
When a worker is in Moderne's VPC, the API gateway serves as a redirect to
the worker node.

@see https://api.moderne.io/worker/results?worker=abc123 | -| **runId** : ID! | | -| **state** : RecipeRunSummaryState! | | -| **stateMessage** : String | | -| **totalResults** : Int! | | -| **totalSearched** : Int! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **commit** | | Commit! | | +| **lastUpdated** | | DateTime! | | +| **repositoryId** | | ID! | | +| **resultsLink** | | String | The GraphQL endpoint that you can execute a RecipeRunResultsByRepository.
When a worker is in Moderne's VPC, the API gateway serves as a redirect to
the worker node.

@see https://api.moderne.io/worker/results?worker=abc123 | +| **runId** | | ID! | | +| **state** | | RecipeRunSummaryState! | | +| **stateMessage** | | String | | +| **totalResults** | | Int! | | +| **totalSearched** | | Int! | | ### Repository -| Field | Description | -| ---- | ---- | -| **commit** : Commit! | | -| **id** : ID! | Example: `netflix:eureka` | -| **ingested** : DateTime! | Example: `2021-05-13T11:56:29.818228-07:00` | -| **javaVersion** : RepositoryJavaVersion | | -| **name** : String! | Example: `eureka` | -| **organization** : Organization! | Example: `netflix` | -| **sourceFilesByType** : [SourceFileTypeCount!]! | Example: {"fileType": "java", "count": 1392} | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **commit** | | Commit! | | +| **id** | | ID! | Example: `netflix:eureka` | +| **ingested** | | DateTime! | Example: `2021-05-13T11:56:29.818228-07:00` | +| **javaVersion** | | RepositoryJavaVersion | | +| **name** | | String! | Example: `eureka` | +| **organization** | | Organization! | Example: `netflix` | +| **sourceFilesByType** | | [SourceFileTypeCount!]! | Example: {"fileType": "java", "count": 1392} | ### RepositoryIndexItem -| Field | Description | -| ---- | ---- | -| **id** : ID! | | -| **link** : String! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **id** | | ID! | | +| **link** | | String! | | ### RepositoryJavaVersion -| Field | Description | -| ---- | ---- | -| **createdBy** : String! | | -| **sourceCompatibility** : String! | | -| **targetCompatibility** : String! | | -| **vmVendor** : String! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **createdBy** | | String! | | +| **sourceCompatibility** | | String! | | +| **targetCompatibility** | | String! | | +| **vmVendor** | | String! | | ### Result -| Field | Description | -| ---- | ---- | -| **after** : String! | | -| **afterSourcePath** : String! | | -| **before** : String! | | -| **beforeSourcePath** : String! | | -| **diff** : String! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **after** | | String! | | +| **afterSourcePath** | | String! | | +| **before** | | String! | | +| **beforeSourcePath** | | String! | | +| **diff** | | String! | | ### ResultConnection -| Field | Description | -| ---- | ---- | -| **edges** : [ResultEdge!]! | | -| **pageInfo** : Page! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **edges** | | [ResultEdge!]! | | +| **pageInfo** | | Page! | | ### ResultEdge -| Field | Description | -| ---- | ---- | -| **cursor** : String! | | -| **node** : Result! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **cursor** | | String! | | +| **node** | | Result! | | ### SourceFileTypeCount -| Field | Description | -| ---- | ---- | -| **count** : Int! | Example: 1392 | -| **fileType** : String! | Example: `java` | -| **linesOfCode** : Int! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **count** | | Int! | Example: 1392 | +| **fileType** | | String! | Example: `java` | +| **linesOfCode** | | Int! | | ### Worker -| Field | Description | -| ---- | ---- | -| **connectedSince** : DateTime! | | -| **name** : String! | | -| **repositories** : [String!]! | | +| Field | Argument | Type | Description | +| ---- | ---- | ---- | ---- | +| **connectedSince** | | DateTime! | | +| **name** | | String! | | +| **repositories** | | [String!]! | | ## Inputs @@ -290,24 +340,24 @@ Recipe option input value type depends on the particular recipe -| Field | Description | -| ---- | ---- | -| **name** : String! | Example: `methodPattern` | -| **value** : Object! | Example: `java.util.List add(..)` | +| Field | | Type | Description | +| ---- | ---- | ---- | ---- | +| **name** | | String! | Example: `methodPattern` | +| **value** | | Object! | Example: `java.util.List add(..)` | ### RecipeInput -| Field | Description | -| ---- | ---- | -| **id** : ID! | Example: `org.openrewrite.java.search.FindMethods` | -| **options** : [OptionInput!] | | +| Field | | Type | Description | +| ---- | ---- | ---- | ---- | +| **id** | | ID! | Example: `org.openrewrite.java.search.FindMethods` | +| **options** | | [OptionInput!] | | ### RecipeRunInput -| Field | Description | -| ---- | ---- | -| **recipe** : RecipeInput! | | -| **repositoryFilter** : [ID!] | Send `null` to run on all repositories.
Example: `airbnb:epoxy` | +| Field | | Type | Description | +| ---- | ---- | ---- | ---- | +| **recipe** | | RecipeInput! | | +| **repositoryFilter** | | [ID!] | Send `null` to run on all repositories.
Example: `airbnb:epoxy` | ## Enums