Skip to content

Commit

Permalink
Remove deprecated graphql fields (stashapp#4064)
Browse files Browse the repository at this point in the history
* Remove deprecated list*Scrapers queries
* Remove other deprecated query resolvers
* Remove deprecated config fields
* Remove deprecated gallery fields
* Remove deprecated image fields
* Remove deprecated movie fields
* Remove deprecated performer fields
* Document scrape function issue
* Remove deprecated studio fields
* Remove deprecated scan input fields
* Remove deprecated scene fields
* Remove deprecated fields from filters
* Remove scene.file_mod_time
  • Loading branch information
WithoutPants authored and halkeye committed Sep 1, 2024
1 parent 5d19210 commit a378ca7
Show file tree
Hide file tree
Showing 66 changed files with 101 additions and 1,223 deletions.
5 changes: 0 additions & 5 deletions graphql/documents/data/config.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ fragment ConfigGeneralData on ConfigGeneralResult {
excludes
imageExcludes
customPerformerImageLocation
scraperUserAgent
scraperCertCheck
scraperCDPPath
stashBoxes {
name
endpoint
Expand Down Expand Up @@ -139,8 +136,6 @@ fragment ScraperSourceData on ScraperSource {

fragment ConfigDefaultSettingsData on ConfigDefaultSettingsResult {
scan {
useFileMetadata
stripFileExtension
scanGenerateCovers
scanGeneratePreviews
scanGenerateImagePreviews
Expand Down
1 change: 0 additions & 1 deletion graphql/documents/data/movie.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ fragment MovieData on Movie {
scenes {
id
title
path
}
}
1 change: 0 additions & 1 deletion graphql/documents/data/performer.graphql
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
fragment PerformerData on Performer {
id
checksum
name
disambiguation
url
Expand Down
3 changes: 0 additions & 3 deletions graphql/documents/queries/scrapers/freeones.graphql

This file was deleted.

8 changes: 4 additions & 4 deletions graphql/documents/queries/scrapers/scrapers.graphql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
query ListPerformerScrapers {
listPerformerScrapers {
listScrapers(types: [PERFORMER]) {
id
name
performer {
Expand All @@ -10,7 +10,7 @@ query ListPerformerScrapers {
}

query ListSceneScrapers {
listSceneScrapers {
listScrapers(types: [SCENE]) {
id
name
scene {
Expand All @@ -21,7 +21,7 @@ query ListSceneScrapers {
}

query ListGalleryScrapers {
listGalleryScrapers {
listScrapers(types: [GALLERY]) {
id
name
gallery {
Expand All @@ -32,7 +32,7 @@ query ListGalleryScrapers {
}

query ListMovieScrapers {
listMovieScrapers {
listScrapers(types: [MOVIE]) {
id
name
movie {
Expand Down
32 changes: 1 addition & 31 deletions graphql/schema/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,6 @@ type Query {

"List available scrapers"
listScrapers(types: [ScrapeContentType!]!): [Scraper!]!
listPerformerScrapers: [Scraper!]!
@deprecated(reason: "Use listScrapers(types: [PERFORMER])")
listSceneScrapers: [Scraper!]!
@deprecated(reason: "Use listScrapers(types: [SCENE])")
listGalleryScrapers: [Scraper!]!
@deprecated(reason: "Use listScrapers(types: [GALLERY])")
listMovieScrapers: [Scraper!]!
@deprecated(reason: "Use listScrapers(types: [MOVIE])")

"Scrape for a single scene"
scrapeSingleScene(
Expand Down Expand Up @@ -170,27 +162,6 @@ type Query {
"Scrapes a complete movie record based on a URL"
scrapeMovieURL(url: String!): ScrapedMovie

"Scrape a list of performers based on name"
scrapePerformerList(scraper_id: ID!, query: String!): [ScrapedPerformer!]!
@deprecated(reason: "use scrapeSinglePerformer")
"Scrapes a complete performer record based on a scrapePerformerList result"
scrapePerformer(
scraper_id: ID!
scraped_performer: ScrapedPerformerInput!
): ScrapedPerformer @deprecated(reason: "use scrapeSinglePerformer")
"Scrapes a complete scene record based on an existing scene"
scrapeScene(scraper_id: ID!, scene: SceneUpdateInput!): ScrapedScene
@deprecated(reason: "use scrapeSingleScene")
"Scrapes a complete gallery record based on an existing gallery"
scrapeGallery(scraper_id: ID!, gallery: GalleryUpdateInput!): ScrapedGallery
@deprecated(reason: "use scrapeSingleGallery")

"Scrape a list of performers from a query"
scrapeFreeonesPerformerList(query: String!): [String!]!
@deprecated(
reason: "use scrapeSinglePerformer with scraper_id = builtin_freeones"
)

# Plugins
"List loaded plugins"
plugins: [Plugin!]
Expand Down Expand Up @@ -228,8 +199,7 @@ type Query {
allMovies: [Movie!]!
allTags: [Tag!]!

# @deprecated
allPerformers: [Performer!]!
allPerformers: [Performer!]! @deprecated(reason: "Use findPerformers instead")

# Get everything with minimal metadata

Expand Down
36 changes: 0 additions & 36 deletions graphql/schema/types/config.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ input ConfigGeneralInput {
password: String
"Maximum session cookie age"
maxSessionAge: Int
"Comma separated list of proxies to allow traffic from"
trustedProxies: [String!] @deprecated(reason: "no longer supported")
"Name of the log file"
logFile: String
"Whether to also output to stderr"
Expand All @@ -165,21 +163,6 @@ input ConfigGeneralInput {
imageExcludes: [String!]
"Custom Performer Image Location"
customPerformerImageLocation: String
"Scraper user agent string"
scraperUserAgent: String
@deprecated(
reason: "use mutation ConfigureScraping(input: ConfigScrapingInput) instead"
)
"Scraper CDP path. Path to chrome executable or remote address"
scraperCDPPath: String
@deprecated(
reason: "use mutation ConfigureScraping(input: ConfigScrapingInput) instead"
)
"Whether the scraper should check for invalid certificates"
scraperCertCheck: Boolean
@deprecated(
reason: "use mutation ConfigureScraping(input: ConfigScrapingInput) instead"
)
"Stash-box instances used for tagging"
stashBoxes: [StashBoxInput!]
"Python path - resolved using path if unset"
Expand Down Expand Up @@ -269,8 +252,6 @@ type ConfigGeneralResult {
password: String!
"Maximum session cookie age"
maxSessionAge: Int!
"Comma separated list of proxies to allow traffic from"
trustedProxies: [String!] @deprecated(reason: "no longer supported")
"Name of the log file"
logFile: String
"Whether to also output to stderr"
Expand All @@ -295,15 +276,6 @@ type ConfigGeneralResult {
imageExcludes: [String!]!
"Custom Performer Image Location"
customPerformerImageLocation: String
"Scraper user agent string"
scraperUserAgent: String
@deprecated(reason: "use ConfigResult.scraping instead")
"Scraper CDP path. Path to chrome executable or remote address"
scraperCDPPath: String
@deprecated(reason: "use ConfigResult.scraping instead")
"Whether the scraper should check for invalid certificates"
scraperCertCheck: Boolean!
@deprecated(reason: "use ConfigResult.scraping instead")
"Stash-box instances used for tagging"
stashBoxes: [StashBox!]!
"Python path - resolved using path if unset"
Expand Down Expand Up @@ -388,9 +360,6 @@ input ConfigInterfaceInput {
"Interface language"
language: String

"Slideshow Delay"
slideshowDelay: Int @deprecated(reason: "Use imageLightbox.slideshowDelay")

imageLightbox: ConfigImageLightboxInput

"Set to true to disable creating new objects via the dropdown menus"
Expand Down Expand Up @@ -461,15 +430,10 @@ type ConfigInterfaceResult {
"Interface language"
language: String

"Slideshow Delay"
slideshowDelay: Int @deprecated(reason: "Use imageLightbox.slideshowDelay")

imageLightbox: ConfigImageLightboxResult!

"Fields are true if creating via dropdown menus are disabled"
disableDropdownCreate: ConfigDisableDropdownCreate!
disabledDropdownCreate: ConfigDisableDropdownCreate!
@deprecated(reason: "Use disableDropdownCreate")

"Handy Connection Key"
handyKey: String
Expand Down
31 changes: 0 additions & 31 deletions graphql/schema/types/filters.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ input PerformerFilterType {
country: StringCriterionInput
"Filter by eye color"
eye_color: StringCriterionInput
"Filter by height"
height: StringCriterionInput @deprecated(reason: "Use height_cm instead")
"Filter by height in cm"
height_cm: IntCriterionInput
"Filter by measurements"
Expand Down Expand Up @@ -135,13 +133,7 @@ input PerformerFilterType {
"Filter by o count"
o_counter: IntCriterionInput
"Filter by StashID"
stash_id: StringCriterionInput
@deprecated(reason: "Use stash_id_endpoint instead")
"Filter by StashID"
stash_id_endpoint: StashIDCriterionInput
"Filter by rating"
rating: IntCriterionInput
@deprecated(reason: "Use 1-100 range with rating100")
# rating expressed as 1-100
rating100: IntCriterionInput
"Filter by url"
Expand Down Expand Up @@ -169,8 +161,6 @@ input PerformerFilterType {
}

input SceneMarkerFilterType {
"Filter to only include scene markers with this tag"
tag_id: ID @deprecated(reason: "use tags filter instead")
"Filter to only include scene markers with these tags"
tags: HierarchicalMultiCriterionInput
"Filter to only include scene markers attached to a scene with these tags"
Expand Down Expand Up @@ -212,9 +202,6 @@ input SceneFilterType {
path: StringCriterionInput
"Filter by file count"
file_count: IntCriterionInput
"Filter by rating"
rating: IntCriterionInput
@deprecated(reason: "Use 1-100 range with rating100")
# rating expressed as 1-100
rating100: IntCriterionInput
"Filter by organized"
Expand Down Expand Up @@ -256,9 +243,6 @@ input SceneFilterType {
"Filter by performer count"
performer_count: IntCriterionInput
"Filter by StashID"
stash_id: StringCriterionInput
@deprecated(reason: "Use stash_id_endpoint instead")
"Filter by StashID"
stash_id_endpoint: StashIDCriterionInput
"Filter by url"
url: StringCriterionInput
Expand Down Expand Up @@ -289,9 +273,6 @@ input MovieFilterType {

"Filter by duration (in seconds)"
duration: IntCriterionInput
"Filter by rating"
rating: IntCriterionInput
@deprecated(reason: "Use 1-100 range with rating100")
# rating expressed as 1-100
rating100: IntCriterionInput
"Filter to only include movies with this studio"
Expand Down Expand Up @@ -320,15 +301,9 @@ input StudioFilterType {
"Filter to only include studios with this parent studio"
parents: MultiCriterionInput
"Filter by StashID"
stash_id: StringCriterionInput
@deprecated(reason: "Use stash_id_endpoint instead")
"Filter by StashID"
stash_id_endpoint: StashIDCriterionInput
"Filter to only include studios missing this property"
is_missing: String
"Filter by rating"
rating: IntCriterionInput
@deprecated(reason: "Use 1-100 range with rating100")
# rating expressed as 1-100
rating100: IntCriterionInput
"Filter by scene count"
Expand Down Expand Up @@ -368,9 +343,6 @@ input GalleryFilterType {
is_missing: String
"Filter to include/exclude galleries that were created from zip"
is_zip: Boolean
"Filter by rating"
rating: IntCriterionInput
@deprecated(reason: "Use 1-100 range with rating100")
# rating expressed as 1-100
rating100: IntCriterionInput
"Filter by organized"
Expand Down Expand Up @@ -476,9 +448,6 @@ input ImageFilterType {
path: StringCriterionInput
"Filter by file count"
file_count: IntCriterionInput
"Filter by rating"
rating: IntCriterionInput
@deprecated(reason: "Use 1-100 range with rating100")
# rating expressed as 1-100
rating100: IntCriterionInput
"Filter by date"
Expand Down
13 changes: 0 additions & 13 deletions graphql/schema/types/gallery.graphql
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
"Gallery type"
type Gallery {
id: ID!
checksum: String! @deprecated(reason: "Use files.fingerprints")
path: String @deprecated(reason: "Use files.path")
title: String
url: String @deprecated(reason: "Use urls")
urls: [String!]!
date: String
details: String
# rating expressed as 1-5
rating: Int @deprecated(reason: "Use 1-100 range with rating100")
# rating expressed as 1-100
rating100: Int
organized: Boolean!
created_at: Time!
updated_at: Time!
file_mod_time: Time @deprecated(reason: "Use files.mod_time")

files: [GalleryFile!]!
folder: Folder
Expand All @@ -27,8 +22,6 @@ type Gallery {
tags: [Tag!]!
performers: [Performer!]!

"The images in the gallery"
images: [Image!]! @deprecated(reason: "Use findImages")
cover: Image
}

Expand All @@ -38,8 +31,6 @@ input GalleryCreateInput {
urls: [String!]
date: String
details: String
# rating expressed as 1-5
rating: Int @deprecated(reason: "Use 1-100 range with rating100")
# rating expressed as 1-100
rating100: Int
organized: Boolean
Expand All @@ -57,8 +48,6 @@ input GalleryUpdateInput {
urls: [String!]
date: String
details: String
# rating expressed as 1-5
rating: Int @deprecated(reason: "Use 1-100 range with rating100")
# rating expressed as 1-100
rating100: Int
organized: Boolean
Expand All @@ -77,8 +66,6 @@ input BulkGalleryUpdateInput {
urls: BulkUpdateStrings
date: String
details: String
# rating expressed as 1-5
rating: Int @deprecated(reason: "Use 1-100 range with rating100")
# rating expressed as 1-100
rating100: Int
organized: Boolean
Expand Down
Loading

0 comments on commit a378ca7

Please sign in to comment.