2 ms·
Looks like a low friction way to bring on new team members to GraphQL. However, the tools is either broken or not finished yet. I tried to change posts to book
by tapsboy 8y ago
Looks like a low friction way to bring on new team members to GraphQL.
However, the tools is either broken or not finished yet. I tried to change posts to books in the JSON tab and I get an error below: "Cannot extend type "Post" because it does not exist in the existing schema."
- spell-slinger 8y agoGlad you found it useful! Sorry for the cryptic error. That happens because the two objects in the comments array reference post_id. If you change those keys to book_id everything should work. The algorithm for generating a GraphQL schema from a JSON object could be improved, along with its error handling. I use the algorithm from this repo: https://github.com/marmelab/graphql-schema-from-json https://github.com/marmelab/graphql-schema-from-json. Error messages come from there. I'll work on improving this tool and make it more user friendly. But I think that it is worth sharing it, even at this stage. Cheers!