Skip to content
Discussion options

You must be logged in to vote

Hey, @drewbitt. Allow me to clarify: you're doing something akin to a mock-first development, where you have a bunch of request handlers written in MSW but there's no actual GraphQL server/schema present yet. So you want to take your mocks and turn them into a schema. Is that correct?

If that's the case, I don't think there's an easy way of doing that. You can always write a parser that analyzes your handlers and builds an AST of GraphQL schema in JavaScript syntax (if that's what you want in the first place) but that's time-consuming. Moreover, MSW is not a reliable source of truth for GraphQL schemas. It would involve a lot of value inference to figure out what your data intention is ba…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@drewbitt
Comment options

@andykenward
Comment options

@drewbitt
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by drewbitt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants