Skip to content

GraphQL

Wok edited this page Jan 9, 2022 · 23 revisions
  1. You cannot parse the schema:
https://www.epicgames.com/graphql?query={ __schema { types {name} }}
---> "GraphQL introspection is not allowed by Apollo Server, but the query contained __schema or __type.
To enable introspection, pass introspection: true to ApolloServer in production"
---> "{\"errorStatus\":500}"
  1. You can query the GraphQL API of EGS with:
https://www.epicgames.com/graphql?operationName=searchStoreQuery
&variables={"start": 0, "count": 3, "country":"FR"}
&extensions={"persistedQuery": 
{"version": 1,"sha256Hash": "6e7c4dd0177150eb9a47d624be221929582df8648e7ec271c821838ff4ee148e"} }

or:

https://www.epicgames.com/graphql?query={ Catalog { 
searchStore(start: 0, count: 3) { 
paging {count total}
elements { title promotions {
promotionalOffers { promotionalOffers { startDate endDate 
discountSetting {discountType discountPercentage} } }
upcomingPromotionalOffers { promotionalOffers { startDate endDate 
discountSetting {discountType discountPercentage} } }
} } } } }
  1. You can iterate with start and count!

  2. You can check upcoming promotions, despite the 403 Forbidden error and null entries: some entries are not null!

https://www.epicgames.com/graphql?query={ Catalog { 
searchStore { 
paging {count total} 
elements { title promotions {
upcomingPromotionalOffers {promotionalOffers {startDate}} 
} } } } }
---> "CatalogOffer/promotions: Request failed with status code 403"
---> "{\"errorCode\":\"errors.com.epicgames.common.missing_permission\",
\"errorMessage\":\"Sorry your login does not posses
the permissions 'priceengine:shared:promotionrule READ' needed to perform the requested operation\",
\"messageVars\":[\"priceengine:shared:promotionrule\",\"READ\"],\"numericErrorCode\":1023,
\"originatingService\":\"com.epicgames.priceengine.public\",\"intent\":\"prod\",\"errorStatus\":403}"
  1. You can filter by namespace!
https://www.epicgames.com/graphql?query={ Catalog {
searchStore(namespace: "d5241c76f178492ea1540fce45616757", start: 0, count: 3) {
paging {count total}
elements {id namespace title productSlug items {id}}
} } }
Clone this wiki locally