WARNING: This project is in a very early stage and not yet ready for production use. I'm in the process of extracting code from Churros' API documentation package and turning it into a library.
A collection of functions and Svelte components to easily build a documentation site for a GraphQL API.
Create your website by using our template:
yarn create narasimha my-docs-site
You can, in the e.g. load function of a SvelteKit page, use the utility functions to get schema information:
import { schemaUtils } from 'narasimha';
import { schema } from '$lib/schema';
export async function load({ params }) {
return { query: schemaUtils.findQueryInSchema(schema, params.query) };
}
You can also use the components directly in an existing Svelte(Kit) project:
<script>
import { Query } from 'narasimha';
export let data: PageData;
</script>
<Query query={data.query}>