-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate JSON Schema consistency #4
base: master
Are you sure you want to change the base?
Generate JSON Schema consistency #4
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @wittydeveloper, thanks for the pull requests! I'm going to bundle this with your other PR in one release and give you a shout when it's published.
Hi @jakubfiala , thanks! However, please wait, this PR is not ready yet 🙏 |
oh sure, not merging it yet :) |
Hi @jakubfiala, After many work on the JSON-Schema standard compliance, I found that many things generated by the lib are "invalid" JSON-Schema properties. I maintain a fork of this project with a partial fix. In order to ship a version fully compliant with the JSON Schema standard, I will need to refactor a lot of the code and i'm not sure if this changes make senses for the purpose of this repo? I was thinking creating a different project that generate strictly valid JSON Schema (by ignoring not compatible GraphQL types, etc), what do you think? Cheers, |
Hey @wittydeveloper – really sorry for only getting back to this after a few months, they've been very busy ones. I think what you're proposing makes sense, my approach was to represent as much as possible of the GSL at the cost of potential non-compliance with JSON Schema, while your approach is the other way around. Thanks for your contributions to this project! |
@jakubfiala No problem! Sorry on my side too, considering I needed a GraphQL to JSON Schema tool pretty quick and also another result (compliant), I started a new package: I didn't want to edit too many things in your library, and especially I prefer working with TypeScript 😅 |
Pull request still in development
draft-07
transform
returns a valid JSON Schema usingajv
libGRAPHQL_SCALAR
,GRAPHQL_UNION
andGRAPHQL_ENUM
in generated strict schema