Skip to content

Commit

Permalink
typing simplification, test improvements, and more
Browse files Browse the repository at this point in the history
  • Loading branch information
jfeodor committed Nov 19, 2024
1 parent 93b8c50 commit be667cd
Show file tree
Hide file tree
Showing 23 changed files with 1,333 additions and 1,362 deletions.
31 changes: 23 additions & 8 deletions python/queries.gql
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ fragment CollectionFileReference on CollectionFile {
}
}

fragment CollectionFileNotFound on CollectionFileNotFound {
id
}

mutation CollectionCreate($organizationID: ID!, $key: ID!, $parentID: ID) {
collectionCreate(
organizationID: $organizationID
Expand Down Expand Up @@ -248,7 +252,7 @@ query CollectionDocuments(
}
}

mutation CollectionFile($collectionID: ID!, $key: ID!) {
mutation CollectionFileCreate($collectionID: ID!, $key: ID!) {
collectionFileCreate(collectionID: $collectionID, key: $key) {
__typename
... on CollectionFile {
Expand All @@ -257,23 +261,25 @@ mutation CollectionFile($collectionID: ID!, $key: ID!) {
}
}

mutation collectionFileDelete($id: ID!) {
mutation CollectionFileDelete($id: ID!) {
collectionFileDelete(id: $id) {
__typename
... on CollectionFile {
...CollectionFileReference
}
... on CollectionFileNotFound {
...CollectionFileNotFound
}
}
}

mutation collectionFiles(
$organizationID: ID!
$key: ID!
query CollectionFiles(
$collectionID: ID!
$tag: TagInput
$after: ID
$first: Int
) {
collectionCreate(organizationID: $organizationID, key: $key) {
collection(id: $collectionID) {
__typename
... on Collection {
id
Expand All @@ -296,7 +302,7 @@ mutation collectionFiles(
}
}

mutation collectionFileTagAdd($id: ID!, $tag: TagInput!) {
mutation CollectionFileTagAdd($id: ID!, $tag: TagInput!) {
collectionFileTagAdd(id: $id, tag: $tag) {
__typename
... on CollectionFile {
Expand All @@ -305,11 +311,20 @@ mutation collectionFileTagAdd($id: ID!, $tag: TagInput!) {
}
}

mutation collectionFileTagDelete($id: ID!, $tag_key: String!) {
mutation CollectionFileTagDelete($id: ID!, $tag_key: String!) {
collectionFileTagDelete(id: $id, key: $tag_key) {
__typename
... on CollectionFile {
...CollectionFileReference
}
}
}

query CollectionFile($id: ID!) {
collectionFile(id: $id) {
__typename
... on CollectionFile {
...CollectionFileReference
}
}
}
Loading

0 comments on commit be667cd

Please sign in to comment.