UNPKG

polen

Version:

A framework for delightful GraphQL developer portals

14 lines 400 B
import { Fs } from '@wollybeard/kit'; import { buildASTSchema, parse } from 'graphql'; export const read = async (sdlFilePath) => { const content = await Fs.read(sdlFilePath); if (!content) return null; const node = parse(content); const schema = buildASTSchema(node); return { path: sdlFilePath, content: schema, }; }; //# sourceMappingURL=read.js.map