Closed pkqk closed 1 year ago
Add the ability to trigger the limits plugin by adding a slow-service to the examples.
limits
slow-service
It adds a delay field on the Gizmo that takes a duration to sleep for:
delay
Gizmo
query { randomGizmo { id delay(duration: "500ms") } }
which returns how long it took:
{ "data": { "randomGizmo": { "id": "999", "delay": "503.987916ms" } } }
and if you hit the timeout you get a response like:
{ "errors": [ { "message": "error during request: Post \"http://slow-service:8080/query\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", "path": [ "randomGizmo" ], "locations": [ { "line": 4, "column": 5 } ], "extensions": { "selectionSet": "{ delay(duration: \"2s\") _bramble_id: id _bramble__typename: __typename }" } } ], "data": { "randomGizmo": { "id": "476", "delay": null } } }
Add the ability to trigger the
limits
plugin by adding aslow-service
to the examples.It adds a
delay
field on theGizmo
that takes a duration to sleep for:which returns how long it took:
and if you hit the timeout you get a response like: