Science Score: 39.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.7%) to scientific vocabulary
Keywords
Repository
Ontology-Based GraphQL Server Generation (OBG-gen)
Basic Info
Statistics
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 1
Topics
Metadata Files
README.md
OBG-gen: Ontology-Based GraphQL Server Generation for Data Access and Integration
A GraphQL-based framework for data access and integration in which a global domain ontology drives the generation of a GraphQL server that answers requests by querying the heterogeneous data sources. The core of this framework contains an algorithm to generate a GraphQL schema based on an ontology, and a generic GraphQL resolver function as a library based on semantic mappings.
The Framework of OBG-gen for Data Access and Integration

- GrapahQL Server Generation Process
- (i): Ontology-based GraphQL schema generation
- (ii): Generic resolver function implementation based on semantic mappings
Getting Started
- schemagenerator/graphqlschema_gen.py takes an ontology as the input and then outputs a GraphQL schema.
- mappingparser/mappingparser.py takes a RML mappings file (in turtle format) as the input and then outputs mappings and logical sources into a json file.
- app.py is used to set up the GraphQL server using Ariadne.
Installation (tested with python version 3.9)
Following packages are needed and successfully installed messages are shown:
pip install ariadne pip install Flask pip install requests pip install pandas pip install sqlalchemy pip install sympy pip install PyMySQL pip install rdflib
Successfully installed anyio-3.4.0 ariadne-0.14.0 graphql-core-3.1.6 idna-3.3 sniffio-1.2.0 starlette-0.17.1 typing-extensions-4.0.1 Successfully installed Flask-2.0.2 Jinja2-3.0.3 MarkupSafe-2.0.1 Werkzeug-2.0.2 click-8.0.3 itsdangerous-2.0.1 Successfully installed charset-normalizer-2.0.8 requests-2.26.0 urllib3-1.26.7 Successfully installed numpy-1.21.4 pandas-1.3.4 python-dateutil-2.8.2 pytz-2021.3 six-1.16.0 Successfully installed greenlet-1.1.2 sqlalchemy-1.4.27 Successfully installed mpmath-1.2.1 sympy-1.9 Successfully installed PyMySQL-1.0.2 Successfully installed isodate-0.6.0 pyparsing-3.0.6 rdflib-6.0.2
Usage
Pre-Step (i): Generate GraphQL schema from an ontology and output (*)-schema.graphql and (*)2graphql.json files in current folder.
python ./schema_generator/graphql_schema_gen.py ./schema_generator/mdo.ttl
Pre-Step (ii): Parse a RML mappings file and output the (*).json file in current folder, which will be an input of the generic resolver function.
python ./mapping_parser/mapping_parser.py ./mapping_parser/semantic_mappings/mdo-mappings-mysql-1K.ttl
Step 1: Set up the GraphQL server.
python app.py ./schema_generator/mdo-schema.graphql ./schema_generator/mdo2graphql.json ./mapping_parser/mdo-mappings-mysql-1K.json
* Serving Flask app "app" (lazy loading)
* Environment: development
* Debug mode: on
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 540-041-748
Then the GraphQL server can be accessed via http://127.0.0.1:5000/graphql as shown below.

You don't have to re-run *Pre-Step (i)** and/or Pre-Step (ii) if you have not changed your ontology and/or RML mappings.*
Evaluation
You can find more details regarding the evaluation of the framework in this folder.
Publication
Li H, Hartig O, Armiento R, Lambrix P. Ontology-based GraphQL server generation for data access and data integration. Semantic Web. 2024. DOI: 10.3233/SW-233550
Owner
- Name: LiUSemWeb
- Login: LiUSemWeb
- Kind: organization
- Location: Linköping, Sweden
- Website: https://www.ida.liu.se/research/semanticweb/
- Twitter: liusemweb
- Repositories: 6
- Profile: https://github.com/LiUSemWeb
Software developed by the Semantic Web research group at Linköping University
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1