graphql-kit / graphql-voyager

🛰️ Represent any GraphQL API as an interactive graph
https://graphql-kit.com/graphql-voyager/
MIT License
7.76k stars 514 forks source link

Add `sdlToSchema` to public API #332

Closed bollwyvl closed 8 months ago

bollwyvl commented 1 year ago

Thanks for this tool!

Motivated by https://github.com/graphql-kit/graphql-voyager/issues/238#issuecomment-1588570268, this strawman exports sdlToIntrospection.

A concrete use case for this is when a live server is not readily accessible, but an SDL is available.

A more sweeping approach would be to also ship an intermediate lib such that a downstream could:

import { sdlToIntrospection } from 'graphql-voyager/lib/utils/sdl-to-introspection';
LunaticMuch commented 1 year ago

@bollwyvl you need to rebase. In version 2.0 the function is now sdlToSchema

bollwyvl commented 1 year ago

@LunaticMuch thoughts?

optimistex commented 8 months ago

@LunaticMuch Current changes are correct. Can you please merge it? @bollwyvl FYI

bollwyvl commented 8 months ago

Hey, thanks a lot!