Skip to content

Ragnarok

URL: https://services.hostedshop.dk/graphql/public (use a GraphQL tool for browsing the schema like Altair).

Repository: https://gitlab.group.team.blue/hostedshop/proj/ragnarok

Config: https://gitlab.group.team.blue/hostedshop/config/k8s-cluster-prod/-/tree/master/prod/production/vendor/ragnarok

Ragnarok is an Apollo GraphQL gateway that is used for stitching GraphQL schema's together that allows all services to be accessible on a single public endpoint: https://services.hostedshop.dk/graphql/public.

How to add services to Ragnarok

  1. Edit https://gitlab.group.team.blue/hostedshop/config/k8s-cluster-prod/-/blob/master/prod/production/vendor/ragnarok/configmap.yaml
  2. Push the change.
  3. Spam https://services.hostedshop.dk/reload?reloadSecret=[secret] 6 times or more. (Secrets can be found here and see below for an explanation as to why you need to spam the endpoint).

Why do i need to spam the reload endpoint?

When the configmap.yaml file is uploaded the service currently does not pick up the change automatically. So you need to somehow trigger a reload. You can do the following to force a reload:

  • Delete the pods. New one's will be automatically spawned. OR
  • Spam the reload endpoint 6 times or more.