Add timeout to GraphQL queries

Summary

There is no timeout on GraphQL queries. The graphql-ruby library allows us to implement a timeout that returns a partial response if the timeout is triggered. The response contains the fields that had a chance to resolve, and anything unresolved is nil.

Potential solution

We can add timeout middleware quite easily using the graphql-ruby library. However, implementing this solution would have to take into account that the frontend must be able to properly handle partial responses.

Edited Jan 02, 2020 by GitLab SecurityBot
Assignee Loading
Time tracking Loading