Skip to content

Commit

Permalink
Update PPEs
Browse files Browse the repository at this point in the history
  • Loading branch information
Affie committed Dec 15, 2024
1 parent 1279f94 commit f2e7733
Showing 1 changed file with 16 additions and 76 deletions.
92 changes: 16 additions & 76 deletions ppes.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,53 +25,26 @@ fragment FRAGMENT_PPE on PPE {
[operations]

QUERY_GET_PPE = """
query QUERY_GET_PPE(
$userLabel: EmailAddress!
$robotLabel: String!
$sessionLabel: String!
$variableLabel: String!
$solveKey: ID!
) {
users(where: { label: $userLabel }) {
robots(where: { label: $robotLabel }) {
sessions(where: { label: $sessionLabel }) {
variables(where: { label: $variableLabel }) {
ppes(where: { solveKey: $solveKey }) {
...FRAGMENT_PPE
}
}
}
}
query getPpe($id: ID!) {
ppes(where: { id: $id }) {
...FRAGMENT_PPE
}
}
"""

QUERY_GET_PPES_FOR_VARIABLE = """
query QUERY_GET_PPES_FOR_VARIABLE(
$userLabel: EmailAddress!
$robotLabel: String!
$sessionLabel: String!
$variableLabel: String!
) {
users(where: { label: $userLabel }) {
robots(where: { label: $robotLabel }) {
sessions(where: { label: $sessionLabel }) {
variables(where: { label: $variableLabel }) {
ppes {
...FRAGMENT_PPE
}
}
}
QUERY_GET_PPES = """
query getPpes($id: ID!) {
variables(where: { id: $id }) {
ppes {
...FRAGMENT_PPE
}
}
}
"""

MUTATION_ADD_PPES = """
mutation MUTATION_ADD_PPES($ppes: [PPECreateInput!]!) {
addPpes(
input: $ppes
) {
mutation addPpes($ppes: [PPECreateInput!]!) {
addPpes(input: $ppes) {
ppes {
...FRAGMENT_PPE
}
Expand All @@ -80,28 +53,17 @@ mutation MUTATION_ADD_PPES($ppes: [PPECreateInput!]!) {
"""

QUERY_LIST_PPES = """
query QUERY_LIST_PPES(
$userLabel: EmailAddress!
$robotLabel: String!
$sessionLabel: String!
$variableLabel: String!
) {
users(where: { label: $userLabel }) {
robots(where: { label: $robotLabel }) {
sessions(where: { label: $sessionLabel }) {
variables(where: { label: $variableLabel }) {
ppes {
solveKey
}
}
}
query listPpes($id: ID!) {
variables (where: {id: $id}) {
ppes {
solveKey
}
}
}
"""

MUTATION_UPDATE_PPE = """
mutation MUTATION_UPDATE_PPE($id: ID!, $ppe: PPEUpdateInput!) {
mutation updatePpe($id: ID!, $ppe: PPEUpdateInput!) {
updatePpes(
update: $ppe
where: {id: $id}
Expand All @@ -114,31 +76,9 @@ mutation MUTATION_UPDATE_PPE($id: ID!, $ppe: PPEUpdateInput!) {
"""

MUTATION_DELETE_PPE = """
mutation MUTATION_DELETE_PPE($id: ID!) {
mutation deletePpe($id: ID!) {
deletePpes(where: { id: $id }) {
nodesDeleted
}
}
"""

MUTATION_DELETE_PPE_BY_LABEL = """
mutation MUTATION_DELETE_PPE_BY_LABEL(
$userLabel: EmailAddress!
$robotLabel: String!
$sessionLabel: String!
$variableLabel: String!
$solveKey: ID!
) {
deletePpes(
where: {
userLabel: $userLabel
robotLabel: $robotLabel
sessionLabel: $sessionLabel
variableLabel: $variableLabel
solveKey: $solveKey
}
) {
nodesDeleted
}
}
"""

0 comments on commit f2e7733

Please sign in to comment.