-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Add remaining queries and mutations used by the CLI
* Adds various queries for use with the cli * Adds password reset functionality * Fixed up naming * Included import
- Loading branch information
1 parent
8e6daef
commit 94f79c0
Showing
41 changed files
with
797 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
query { | ||
allProjects { | ||
id | ||
name | ||
gitUrl | ||
productionEnvironment | ||
developmentEnvironmentsLimit | ||
environments{ | ||
id | ||
name | ||
environmentType | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
mutation ( | ||
$project: String! | ||
){ | ||
deleteProject( | ||
input: { | ||
project: $project | ||
} | ||
) | ||
} |
7 changes: 7 additions & 0 deletions
7
api/lagoon/client/_lgraphql/projects/projectKeyByName.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query ( | ||
$name: String!) { | ||
projectByName( | ||
name: $name) { | ||
publicKey | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
api/lagoon/client/_lgraphql/projects/projectKeyByNameRevealed.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
query ( | ||
$name: String!) { | ||
projectByName( | ||
name: $name) { | ||
privateKey | ||
publicKey | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
mutation ( | ||
$environment: Int!, | ||
$name: String!, | ||
$command: String!, | ||
$service: String!) { | ||
addTask(input:{ | ||
environment: $environment | ||
command: $command | ||
execute:true | ||
name: $name | ||
service: $service | ||
}) { | ||
id | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
api/lagoon/client/_lgraphql/tasks/getAdvancedTasksByEnvironment.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
query ( | ||
$name: String!, | ||
$project: Int! | ||
){ | ||
environmentByName( | ||
name: $name, | ||
project: $project | ||
){ | ||
id | ||
advancedTasks { | ||
... on AdvancedTaskDefinitionCommand { | ||
id | ||
name | ||
description | ||
} | ||
... on AdvancedTaskDefinitionImage { | ||
id | ||
name | ||
description | ||
} | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
api/lagoon/client/_lgraphql/tasks/getInvokableAdvancedTaskDefinitionsByEnvironment.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
query ($project: Int!, $environment: String!){ | ||
environmentByName( | ||
project: $project | ||
name: $environment | ||
){ | ||
advancedTasks { | ||
... on AdvancedTaskDefinitionCommand { | ||
id | ||
name | ||
description | ||
} | ||
... on AdvancedTaskDefinitionImage { | ||
id | ||
name | ||
description | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
api/lagoon/client/_lgraphql/tasks/getTasksForEnvironment.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
query ($project: Int!, | ||
$environment: String!){ | ||
environmentByName( | ||
project: $project | ||
name: $environment | ||
){ | ||
tasks{ | ||
name | ||
id | ||
remoteId | ||
status | ||
created | ||
started | ||
completed | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
api/lagoon/client/_lgraphql/tasks/invokeRegisteredTask.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
mutation ( | ||
$environment: Int!, | ||
$advancedTaskDefinition: Int!) { | ||
invokeRegisteredTask( | ||
advancedTaskDefinition: $advancedTaskDefinition, | ||
environment: $environment) { | ||
id | ||
name | ||
status | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
api/lagoon/client/_lgraphql/usergroups/addProjectToGroup.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
mutation ( | ||
$project: String!, | ||
$groups: [GroupInput!]!) { | ||
addGroupsToProject(input: { | ||
project: {name: $project} | ||
groups: $groups | ||
}) { | ||
name | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
query allGroups ($name: String) { | ||
allGroups (name: $name) { | ||
name | ||
id | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
api/lagoon/client/_lgraphql/usergroups/deleteGroup.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
mutation ( | ||
$name: String!){ | ||
deleteGroup( | ||
input: { | ||
group: { | ||
name: $name | ||
} | ||
} | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
mutation ( | ||
$email: String!) { | ||
deleteUser( | ||
input:{ | ||
user: { | ||
email: $email | ||
} | ||
} | ||
) | ||
} |
10 changes: 10 additions & 0 deletions
10
api/lagoon/client/_lgraphql/usergroups/groupProjects.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
query allGroups ($name: String!) { | ||
allGroups (name: $name) { | ||
id | ||
name | ||
projects{ | ||
id | ||
name | ||
} | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
api/lagoon/client/_lgraphql/usergroups/resetPassword.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
mutation ( | ||
$email: String!) { | ||
resetUserPassword( | ||
input: { | ||
user: { | ||
email: $email | ||
} | ||
} | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
mutation ( | ||
$patch: UpdateUserPatchInput! | ||
$user: UserInput!){ | ||
updateUser( | ||
input: { | ||
patch: $patch | ||
user: $user | ||
} | ||
){ | ||
id | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
api/lagoon/client/_lgraphql/variables/addOrUpdateEnvVariableByName.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
mutation ( | ||
$input: EnvVariableByNameInput! | ||
) { | ||
addOrUpdateEnvVariableByName(input: $input) { | ||
id | ||
name | ||
value | ||
scope | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
api/lagoon/client/_lgraphql/variables/deleteEnvVariableByName.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
mutation ( | ||
$input: DeleteEnvVariableByNameInput! | ||
) { | ||
deleteEnvVariableByName(input: $input) | ||
} |
10 changes: 10 additions & 0 deletions
10
api/lagoon/client/_lgraphql/variables/getEnvVariablesByProjectEnvironmentName.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
query ( | ||
$input: EnvVariableByProjectEnvironmentNameInput! | ||
){ | ||
getEnvVariablesByProjectEnvironmentName(input: $input) { | ||
id | ||
name | ||
value | ||
scope | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.