Skip to content

GraphQL

Wok edited this page Dec 18, 2021 · 23 revisions
  1. You can query the GraphQL API of EGS with:
https://www.epicgames.com/graphql?operationName=searchStoreQuery
&variables={"country":"FR", "counter": 3}
&extensions={"persistedQuery":{"version":1,"sha256Hash":"0304d711e653a2914f3213a6d9163cc17153c60aef0ef52279731b02779231d2"}}

or:

https://www.epicgames.com/graphql?query={ Catalog { searchStore(count:3, start: 0) { 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 count and start!

  2. 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 check the upcoming promotions, despite the 403 Forbidden error and the 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}"
Clone this wiki locally