GraphQL
GraphQL is an API query language that is used by GOV.UK to serve some live traffic. Our implementation exists in Publishing API and is used by multiple frontend applications.
Traffic is allocated somewhat randomly to either Content Store or GraphQL, to allow us to compare response times between the two. The decision is made in the frontend applications based on a level of traffic that has been configured through environment variables for each schema (named GRAPHQL_RATE_SCHEMA_NAME).
Monitoring GraphQL traffic
A Grafana dashboard exists in each environment to provide metrics on the traffic levels and response times of our GraphQL implementation:
Switching off public GraphQL traffic
To switch off all public traffic, set the GRAPHQL_RATE_* environment variables to zero in the relevant environment, by updating govuk-helm-charts: