Implementing GraphQL as a Query Language for Deductive Databases in SWI-Prolog Using DCGs, Quasi Quotations, and Dicts
Falco Nogatz, Dietmar Seipel

TL;DR
This paper introduces a Prolog library that implements GraphQL as a query language for deductive databases, enabling flexible data access and validation using SWI-Prolog's language features.
Contribution
It presents the first implementation of GraphQL in SWI-Prolog for deductive databases, combining DCGs, quasi quotations, and dicts for type-safe querying.
Findings
Successfully implemented GraphQL type system in SWI-Prolog
Provides a unified interface for data access and validation
Enables flexible querying over deductive databases
Abstract
The methods to access large relational databases in a distributed system are well established: the relational query language SQL often serves as a language for data access and manipulation, and in addition public interfaces are exposed using communication protocols like REST. Similarly to REST, GraphQL is the query protocol of an application layer developed by Facebook. It provides a unified interface between the client and the server for data fetching and manipulation. Using GraphQL's type system, it is possible to specify data handling of various sources and to combine, e.g., relational with NoSQL databases. In contrast to REST, GraphQL provides a single API endpoint and supports flexible queries over linked data. GraphQL can also be used as an interface for deductive databases. In this paper, we give an introduction of GraphQL and a comparison to REST. Using language features…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
