Compare commits
2
Commits
3a96506bd3
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2ebb2be10 | ||
|
|
2126d8e231 |
+106
@@ -0,0 +1,106 @@
|
||||
|
||||
|
||||
Get the list of the performers
|
||||
|
||||
```
|
||||
query {
|
||||
findPerformers {
|
||||
performers {
|
||||
id
|
||||
name
|
||||
alias_list
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
Get the list of the performers , count them and don't add their alias
|
||||
|
||||
```
|
||||
query {
|
||||
findPerformers {
|
||||
count
|
||||
performers {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Find all the images split by 20 images
|
||||
|
||||
```
|
||||
query FindImages {
|
||||
findImages(
|
||||
image_filter: {}
|
||||
filter: { q: "", page: 1, per_page: 20, sort: "created_at", direction: DESC }
|
||||
) {
|
||||
count
|
||||
images {
|
||||
id
|
||||
title
|
||||
tags{
|
||||
name
|
||||
}
|
||||
|
||||
paths {
|
||||
image
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
query GetImageFiles {
|
||||
findImages(filter: { per_page: 20 }) {
|
||||
images {
|
||||
id
|
||||
title
|
||||
tags {
|
||||
id
|
||||
}
|
||||
files {
|
||||
path
|
||||
basename
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Get specific image ID by filename
|
||||
```
|
||||
query FindImageByPath {
|
||||
findImages(
|
||||
image_filter: { path: { value: "/data/1563-01.jpg", modifier: EQUALS } }
|
||||
) {
|
||||
images {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
amateur-have-be-our-favourite-position-fm-MsM3gC.jpg
|
||||
|
||||
update specific image with specified tags
|
||||
```
|
||||
mutation UpdateImageTags($imageId: ID!, $newTagIds: [ID!]) {
|
||||
imageUpdate(input: {
|
||||
id: "58",
|
||||
tag_ids: "5"
|
||||
}) {
|
||||
id
|
||||
tags {
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
examples of query
|
||||
```
|
||||
curl -X POST -H "ApiKey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJwaS11eC1jZSIsInN1YiI6IkFQSUtleSIsImlhdCI6MTc2OTI3MDg0NX0._E6j5vMFV087KrNSjAmF3tVun39-ZXEpTIva9cLRR4Y" -H "Content-Type: application/json" --data '{ "query": "query {findPerformers {performers{id name}}}"}' https://stash.tryton.geeraert.eu/graphql
|
||||
|
||||
curl -X POST -H "ApiKey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJwaS11eC1jZSIsInN1YiI6IkFQSUtleSIsImlhdCI6MTc2OTI3MDg0NX0._E6j5vMFV087KrNSjAmF3tVun39-ZXEpTIva9cLRR4Y" -H "Content-Type: application/json" --data '{ "query": "query {findPerformers {performers{id name}}}"}' https://stash.tryton.geeraert.eu/graphql |jq
|
||||
```
|
||||
Reference in New Issue
Block a user