https://github.com/solidlabresearch/shapeshift
Kotlin library to transform SHACL shapes into GraphQL schemas
https://github.com/solidlabresearch/shapeshift
graphql kotlin shacl
Last synced: 3 months ago
JSON representation
Kotlin library to transform SHACL shapes into GraphQL schemas
- Host: GitHub
- URL: https://github.com/solidlabresearch/shapeshift
- Owner: SolidLabResearch
- License: mit
- Created: 2023-10-13T10:53:25.000Z (over 2 years ago)
- Default Branch: trunk
- Last Pushed: 2023-11-02T14:23:05.000Z (over 2 years ago)
- Last Synced: 2025-02-11T17:55:44.278Z (12 months ago)
- Topics: graphql, kotlin, shacl
- Language: Kotlin
- Homepage:
- Size: 101 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shapeshift
A Kotlin library to transform SHACL shapes into GraphQL types
## Usage
The main entry point of the package is the ```SHACLToGraphQL``` object which provides the ```getShema(config : ShiftConfig)``` function, which takes a ShiftConfig object as a paremeter and returns a GraphQL schema as a String.
### ShiftConfig
The ```ShiftConfig``` object provides the necessary configuration options. It's constructor has three parameters:
* ```catalogUrl (String)```: a URL for a Shape Catalogue to be used to retrieve shapes from. If a URL is provided, it will first try to resolve shapes from the catalog. (default = null)
* ```strict (Boolean)```: Wether it should only accept SHACL core features.
* ```shapeConfigs (Map)```: A map of all ```ShapeConfigs``` (see below) to be considered, with the keys representing the URI of the Shape.
### Shape Config
This object provides additional configuration objects for each Shape to be considered. It's constructor has one parameter:
* ```mutation (Boolean)```: Wether or not mutations should be generated for the shapes.