The Ontotext GraphQL Playground Component is a reusable web component built with StencilJS that provides an interface for exploring and interacting with GraphQL APIs. Designed for use in Ontotext’s GraphDB Workbench and other applications, it leverages the power of GraphiQL while maintaining framework-agnostic reusability.
- Framework-agnostic: Works seamlessly with Angular, React, or other modern frameworks.
- GraphQL Querying: Provides a GraphQL playground built on GraphiQL.
- Customization: Easily extendable for specific project needs.
- Dynamic Asset Loading: Automatically loads required scripts and styles for GraphiQL.
Install the package using npm:
npm install ontotext-graphql-playground-component
To use the component in a plain HTML application:
-
Add the component to your HTML file:
<graphql-playground-component></graphql-playground-component>
-
Ensure the required assets are copied into your
assets
folder. See the Development Notes for details.
To run the component locally:
-
Clone the repository:
git clone https://github.com/Ontotext-AD/ontotext-graphql-playground
-
Navigate to the
ontotext-graphql-playground-component
directory:cd ontotext-graphql-playground/ontotext-graphql-playground-component
-
Install dependencies:
npm install
-
Start the development server:
npm start
-
Open your browser at http://localhost:3333 to view the component.
For detailed development instructions and workflow, refer to the Development Notes.
This project is licensed under the MIT License.