Exploiting Declarative Mapping Rules for Generating GraphQL Servers with Morph-GraphQL
Abstract
In the last decade, REST has become the most common approach to provide web services, yet it was not originally designed to handle typical modern applications (e.g. mobile apps). GraphQL was proposed to reduce the number of queries and data exchanged in comparison with REST. Since its release in 2015, it has gained momentum as an alternative approach to REST. However, generating and maintaining GraphQL resolvers is not a simple task. First, a domain expert has to analyze a dataset, design the corresponding GraphQL schema and map the dataset to the schema. Then, a software engineer (e.g. GraphQL developer) implements the corresponding GraphQL resolvers in a specific programming language. In this paper, we present an approach to exploit the information from mappings rules (relation between target and source schema) and generate a GraphQL server. These mapping rules construct a virtual knowledge graph which is accessed by the generated GraphQL resolvers. These resolvers translate the input GraphQL queries into the queries supported by the underlying dataset. Domain experts or software developers may benefit from our approach: a domain expert does not need to involve software developers to implement the resolvers, and software developers can generate the initial version of the resolvers to be implemented. We implemented our approach in the Morph-GraphQL framework and evaluated it using the LinGBM benchmark.
References
- 1. , GraphQL for archival metadata: An overview of the EHRI GraphQL API, in IEEE Int. Conf. Big Data, 2017, pp. 2225–2230. Crossref, Google Scholar
- 2. , Experiences on migrating restful web services to GraphQL, in Int. Conf. Service-Oriented Computing, 2017, pp. 283–295. Google Scholar
- 3. , A GraphQL approach to healthcare information exchange with HL7 FHIR, Proc. Comput. Sci. 160 (2019) 338–345. Crossref, Google Scholar
- 4. Facebook, Inc., GraphQL, 2018, https://facebook.github.io/graphql/June2018/. Google Scholar
- 5. S. Das, S. Sundara and R. Cyganiak, R2RML: RDB to RDF Mapping Language, 2018, https://www.w3.org/TR/r2rml/. Google Scholar
- 6. , RML: A generic language for integrated RDF mappings of heterogeneous data, in Proc. 7th Workshop on Linked Data on the Web, 2014, http://ceur-ws.org/Vol-1184/. Google Scholar
- 7. A. Poggi, D. Lembo, D. Calvanese, G. De Giacomo, M. Lenzerini and R. Rosati, Linking data to ontologies, Journal on Data Semantics X (2008) 133–173. Google Scholar
- 8. , Translation of relational and non-relational databases into RDF with xR2RML, in 11th Int. Conf. Web Information Systems and Technologies, 2015, pp. 443–454. Crossref, Google Scholar
- 9. , KR2RML: An alternative interpretation of R2RML for heterogenous sources, in Proc. Consuming Linked Data, 2015, http://ceur-ws.org/Vol-1426/. Google Scholar
- 10. , Virtual statistics knowledge graph generation from CSV files, in Emerging Topics in Semantic Technologies: ISWC 2018 Satellite Events,
Studies on the Semantic Web , Vol. 36, 2018, pp. 235–244. Google Scholar - 11. , Rmleditor: A graph-based mapping editor for linked data mappings, in European Semantic Web Conference, 2016, pp. 709–723. Crossref, Google Scholar
- 12. C. A. Knoblock and P. Szekely, Exploiting semantics for big data integration, AI Magazine 36(1) (2015) 25–38. Google Scholar
- 13. , Semantics preserving SPARQL-to-SQL translation, Data Knowl. Eng. 68(10) (2009) 973–1000. Crossref, Web of Science, Google Scholar
- 14. , Morph-GraphQL: GraphQL servers generation from R2RML mappings, in Proc. 31st Int. Conf. Software Engineering and Knowledge Engineering, 2019. Crossref, Google Scholar
- 15. O. Hartig, S. Cheng and L. Lindqvist, Linköping GraphQL Benchmark (LinGBM) kernel description, 2019, https://github.com/LiUGraphQL/LinGBM. Google Scholar
- 16. , The Berlin SPARQL benchmark, Int. J. Semantic Web Inf. Syst. 5(2) (2009) 1–24. Crossref, Web of Science, Google Scholar
- 17. , Formalisation and experiences of R2RML-based SPARQL to SQL query translation using Morph, in Proc. 23rd Int. Conf. World Wide Web, 2014, pp. 479–490. Crossref, Google Scholar
- 18. , Ontario: Federated query processing against a semantic data lake, in Int. Conf. Database and Expert Systems Applications, 2019, pp. 379–395. Crossref, Google Scholar
- 19. , GraphQL-LD: Linked Data Querying with GraphQL, in 17th Int. Semantic Web Conference, 2018, http://ceur-ws.org/Vol-2180/. Google Scholar
- 20. M. Sporny, D. Longley, G. Kellogg, M. Lanthaler and N. Lindström, JSON-LD 1.0, W3C Recommendation 16 (2014) 41. Google Scholar
- 21. , Semantic query languages for knowledge-based web services in a construction context, in Proc. 26th Int. Workshop on Intelligent Computing in Engineering, 2019, http://ceur-ws.org/Vol-2394/. Google Scholar
- 22. , Ontop: Answering SPARQL queries over relational databases, Semantic Web 8(3) (2017) 471–487. Crossref, Web of Science, Google Scholar
- 23. , Semantics and complexity of GraphQL, in Proc. World Wide Web Conf.,
International World Wide Web Conferences Steering Committee , 2018, pp. 1155–1164. Crossref, Google Scholar - 24. , Towards a new generation of ontology based data access, Semantic Web J. 11(1) (2019) 153–160. Crossref, Web of Science, Google Scholar
- 25. , Towards the definition of a language-independent mapping template for knowledge graph creation, in Proc. Third Int. Workshop on Capturing Scientific Knowledge, 2019, http://ceur-ws.org/Vol-2526/. Google Scholar
- 26. , Declarative rules for linked data generation at your fingertips!, in Proc. 15th ESWC: Posters and Demos, 2018. Crossref, Google Scholar
- 27. D. Chaves-Fraga, E. Ruckhaus, F. Priyatna, M.-E. Vidal and O. Corcho, Enhancing OBDA query translation over tabular data with Morph-CSV, preprint, 2020, arXiv:2001.09052. Google Scholar
- 28. , Mirror: Automatic R2RML mapping generation from relational databases, in Int. Conf. Web Engineering, 2015, pp. 326–343. Crossref, Google Scholar
- 29. , Automap4obda: Automated generation of R2RML mappings for obda, in European Knowledge Acquisition Workshop, 2016, pp. 577–592. Crossref, Google Scholar
- 30. , BootOX: Practical mapping of RDBS to OWL 2, in Int. Semantic Web Conf., 2015, pp. 113–132. Crossref, Google Scholar
- 31. , Mappingpedia: A collaborative environment for R2RML mappings, in European Semantic Web Conference, 2017, pp. 114–119. Crossref, Google Scholar
- 32. , Fuzzy semantic labeling of semi-structured numerical datasets, in European Knowledge Acquisition Workshop, 2018, pp. 19–33. Crossref, Google Scholar
Remember to check out the Most Cited Articles! |
---|
Check out our titles in C++ Programming! |