jjwtay / graphSchemaToJson

Convert executable graphql schema to JSON.
MIT License
3 stars 1 forks source link

Please show how each of the examples are translated to a JSON model #3

Open kristianmandrup opened 5 years ago

kristianmandrup commented 5 years ago

Especially interested in Array types, such as [Book] for Author

author.graphql

Please add input model -> output model examples for both and preferably add tests for these two as well. Cheers!

kristianmandrup commented 5 years ago

I'm in the process of creating a schema-converter for use with various schema based tools, such as schema-to-yup

Thanks.

jjwtay commented 5 years ago

I will be adding tests once I finish the update I'm in the middle of with the typeorm converter. As for examples I will double check the output but when I first re did the readme the schemas (input model) were checked into the examples folder and the output is already in the readme. The typings for the output model are in the npm repo or can be cloned and built.

jjwtay commented 5 years ago

I just noticed that as far as the directive parsing goes it's not 100% up to date with the examples since I pulledout some of those directives in the folder examples to move into the other repo. Will update examples slightly to match but more of less it is currently correct.

jjwtay commented 5 years ago

Ok I updated the example graphql files to remove the references to the other library. I also checked in the outputs of me running it once for each output type (ts, js, json). Updated readme to point to that.