GraphQL Schema Generation for Data-Intensive Web APIs

  • Carles FarréEmail author
  • Jovan Varga
  • Robert Almar
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11815)


Sharing data as a (non-)commercial asset on the web is typically performed using an Application Programming Interface (API). Although Linked Data technologies such as RDF and SPARQL enable publishing and accessing data on the web, they do not focus on mediated and controlled web access that data providers are willing to allow. Thus, recent approaches aim at providing traditional REST API layer on top of semantic data sources. In this paper, we propose to take advantage of the new GraphQL framework that, in contrast to the dominant REST API approach, exposes an explicit data model, described in terms of the so-called GraphQL schema, to enable precise retrieving of only required data. We propose a semantic metamodel of the GraphQL Schema. The metamodel is used to enrich the schema of semantic data and enable automatic generation of GraphQL schema. In this context, we present a prototype implementation of our approach and a use case with a real-world dataset, showing how lightly augmenting its ontology to instantiate our metamodel enables automatic GraphQL schema generation.


GraphQL Data-Intensive Web APIs Semantic metamodel 



This work is funded by the Spanish project TIN2016-79269-R.


  1. 1.
    Abelló, A., Ayala, C.P., Farré, C., Gómez, C., Oriol, M., Romero, O.: A data-driven approach to improve the process of data-intensive API creation and evolution. In: Proceedings of the CAiSE-Forum-DC, pp. 1–8 (2017)Google Scholar
  2. 2.
    Buil-Aranda, C., Hogan, A., Umbrich, J., Vandenbussche, P.-Y.: SPARQL web-querying infrastructure: ready for action? In: Alani, H., et al. (eds.) ISWC 2013. LNCS, vol. 8219, pp. 277–293. Springer, Heidelberg (2013). Scholar
  3. 3.
    Bizer, C., Heath, T., Berners-Lee, T.: Linked data - the story so far. Int. J. Semantic Web Inf. Syst. 5(3), 1–22 (2009). Scholar
  4. 4.
    Cyganiak, R., et al.: Resource description framework (RDF): Concepts and abstract syntax (2014).
  5. 5.
    Daga, E., Panziera, L., Pedrinaci, C.: A basilar approach for building web APIs on top of SPARQL endpoints. In: Third Workshop on Services and Applications over Linked APIs and Data, pp. 22–32 (2015)Google Scholar
  6. 6.
    Facebook Inc: GraphQL, June 2018.
  7. 7.
    Groth, P.T., Loizou, A., Gray, A.J.G., Goble, C.A., Harland, L., Pettifer, S.: Api-centric linked data integration: the open PHACTS discovery platform case study. J. Web Sem. 29, 12–18 (2014). Scholar
  8. 8.
    Meroño-Peñuela, A., Hoekstra, R.: Automatic query-centric API for routine access to linked data. In: d’Amato, C., et al. (eds.) ISWC 2017. LNCS, vol. 10588, pp. 334–349. Springer, Cham (2017). Scholar
  9. 9.
    Nadal, S., Abelló, A.: Integration-oriented ontology. In: Encyclopedia of Big Data Technologies, pp. 1–5. Springer, Cham (2018).
  10. 10.
    Rodriguez-Echeverria, R., Cánovas Izquierdo, J.L., Cabot, J.: Towards a UML and IFML mapping to GraphQL. In: Garrigós, I., Wimmer, M. (eds.) ICWE 2017. LNCS, vol. 10544, pp. 149–155. Springer, Cham (2018). Scholar
  11. 11.
    Taelman, R., Sande, M.V., Verborgh, R.: Graphql-ld: linked data querying with graphql. In: ISWC 2018 Posters & Demonstrations, Industry and Blue Sky Ideas Tracks (2018).
  12. 12.
    Varga, J., Romero, O., Pedersen, T.B., Thomsen, C.: Analytical metadata modeling for next generation BI systems. J. Syst. Softw. 144, 240–254 (2018). Scholar
  13. 13.
    Varga, J., Vaisman, A.A., Romero, O., Etcheverry, L., Pedersen, T.B., Thomsen, C.: Dimensional enrichment of statistical linked open data. J. Web Sem. 40, 22–51 (2016).

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Universitat Politècnica de Catalunya, BarcelonaTechBarcelonaSpain

Personalised recommendations