Last active
February 7, 2025 09:28
-
-
Save sunny/07db54478ac030bd277c19cfe734648b to your computer and use it in GitHub Desktop.
Cults query examples
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
mutation { | |
createDiscount( | |
creationId: "Q3JlYXRpb24vMjIwMjQzMA" | |
discountPercentage: 50 | |
discountEndAt: "2024-09-01T16:59:12+02:00" | |
) { | |
discount { | |
creation { | |
name | |
price { | |
cents | |
} | |
} | |
originalPrice { | |
cents | |
} | |
percentage | |
} | |
errors | |
} | |
} |
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
mutation { | |
createCreation( | |
name: "Cults Logo" | |
description: "A Cults logo, to test the API" | |
imageUrls: ["https://wtf.sunfox.org/3d/cults-logo.jpg"] | |
fileUrls: ["https://wtf.sunfox.org/3d/cults-logo.stl"] | |
locale: EN | |
# Identifier for the “Art” category. Check out the list of categories to find their id. | |
categoryId: "Q2F0ZWdvcnkvMjM=" | |
# Identifier for the “Fan Art” sub-category of the “Art” category. | |
subCategoryIds: ["Q2F0ZWdvcnkvMzc"] | |
downloadPrice: 42.5 | |
currency: EUR | |
# Optional: do not provide a license code to use the default ("Cults - Private Use"). | |
# For priced designs, you can use "cults_cu" or "cults_cu_nd". | |
# For free designs check out the full list of licenses. | |
licenseCode: "cults_cu" | |
) { | |
creation { | |
url(locale: EN) | |
} | |
errors | |
} | |
} |
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
{ | |
creationsBatch(onlyDiscounted: true) { | |
results { | |
name(locale: EN) | |
shortUrl | |
price(currency: EUR) { | |
cents | |
} | |
discount { | |
percentage | |
originalPrice(currency: EUR) { | |
cents | |
} | |
startAt | |
endAt | |
} | |
} | |
} | |
} |
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
{ | |
licenses { | |
code | |
name(locale: EN) | |
url(locale: EN) | |
availableOnFreeDesigns | |
availableOnPricedDesigns | |
} | |
} |
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
{ | |
myself { | |
printlistsBatch(limit: 2, offset: 0) { | |
total | |
results { | |
url | |
name | |
public | |
position | |
} | |
} | |
} | |
} |
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
{ | |
myself { | |
salesBatch(limit: 3, offset: 0) { | |
total | |
results { | |
id | |
creation { name(locale: EN) } | |
user { nick } | |
income(currency: EUR) { cents } | |
createdAt | |
payedOutAt | |
} | |
} | |
} | |
} |
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
{ | |
creationsSearchBatch(query: "batman", limit: 3) { | |
total | |
results { | |
name(locale: EN) | |
shortUrl | |
} | |
} | |
} |
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
{ | |
creation(slug: "print-in-place-cute-lucky-bunny") { | |
name(locale: EN) | |
shortUrl | |
illustrationImageUrl | |
license { | |
name(locale: EN) | |
} | |
category { | |
name(locale: EN) | |
} | |
publishedAt | |
viewsCount | |
likesCount | |
downloadsCount | |
tags(locale: EN) | |
price(currency: USD) { | |
cents | |
} | |
creator { | |
nick | |
shortUrl | |
} | |
} | |
} |
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
{ | |
user(nick: "bigovereasy") { | |
shortUrl | |
bio | |
imageUrl | |
creationsCount | |
creations(limit: 3, sort: BY_LIKES) { | |
name(locale: EN) | |
shortUrl | |
illustrationImageUrl | |
} | |
} | |
} |
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
{ | |
categories { | |
id | |
name(locale: EN) | |
children { | |
id | |
name(locale: EN) | |
} | |
} | |
} |
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
{ | |
creationsBatch(sort: BY_PUBLICATION, limit: 3) { | |
results { | |
name(locale: EN) | |
shortUrl | |
} | |
} | |
} |
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
{ | |
myself { | |
user { | |
likedCreations(limit: 10, offset: 0) { | |
name(locale: EN) | |
url(locale: EN) | |
} | |
} | |
} | |
} |
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
{ | |
myself { | |
creationsBatch(limit: 10, offset: 0) { | |
results { | |
name(locale: EN) | |
url(locale: EN) | |
illustrationImageUrl | |
downloadsCount | |
viewsCount | |
totalSalesAmount(currency: USD) { cents } | |
blueprints { | |
fileUrl | |
imageUrl | |
} | |
} | |
} | |
} | |
} |
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
mutation { | |
updateCreation( | |
id: "…" | |
downloadPrice: 4.2 | |
currency: EUR | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment