2018 · 92 citations · 9 references
ComputingComputer ScienceComputer SystemsDistributed SystemsFormal MethodsProgramming LanguagesQuery ProcessingStructured Query LanguageAccess Control InterfaceData AccessGraph QueryingGraphqlPolynomial Time ComplexityPolynomial-time Algorithms
GraphQL is a recently proposed, and increasingly adopted, conceptual framework for providing a new type of data access interface on the Web. The framework includes a new graph query language whose semantics has been specified informally only. This has prevented the formal study of the main properties of the language. We embark on the formalization and study of GraphQL. To this end, we first formalize the semantics of GraphQL queries based on a labeled-graph data model. Thereafter, we analyze the language and show that it admits really efficient evaluation methods. In particular, we prove that the complexity of the GraphQL evaluation problem is NL-complete. Moreover, we show that the enumeration problem can be solved with constant delay. This implies that a server can answer a GraphQL query and send the response byte-by-byte while spending just a constant amount of time between every byte sent. Despite these positive results, we prove that the size of a GraphQL response might be prohibitively large for an internet scenario. We present experiments showing that current practical implementations suffer from this issue. We provide a solution to cope with this problem by showing that the total size of a GraphQL response can be computed in polynomial time. Our results on polynomial-time size computation plus the constant-delay enumeration can help developers to provide more robust GraphQL interfaces on the Web.
9
The complexity of relational query languages (Extended Abstract)
Moshe Y. Vardi · 1982 · 1.2K citations
Computing, Computer Science, Algebra +16
Algorithms for acyclic database schemes
Mihalis Yannakakis · Very Large Data Bases · 1981 · 500 citations
The complexity of acyclic conjunctive queries
Georg Gottlob, Nicola Leone, Francesco Scarcello · Journal of the ACM · 2001 · 196 citations
Enumerating with constant delay the answers to a query
Luc Segoufin · 2013 · 45 citations · Full text