-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
lexicographic_sort_schema is underspecified. #75
Comments
lexicographic_sort_schema
is underspecified.
The function takes a schema and returns a new, sorted schema. The input schema should not be modified (otherwise, please file a bug report). |
I suspect that "parse schema -> sort -> print schema" may be a common usage pattern of
If you think this is a good idea, @pmantica1 and I can work on a PR adding these notes to the Thanks again for all the work you've put into this library! Using it has been a pleasure, and I'd love to help in any way I can. |
Adding more documentation can never harm. If you think something needs to be improved or discussed more fundamentally, maybe it's a good idea to create a ticket at GraphQL.js. The way how the functions work and the docsstrings are ported from there and it's always best to fix things at the source. |
Thanks! I'll start by opening a ticket in GraphQL.js and see how people feel about the idea of parse-print producing SDL equivalent to the original input, then based on the feedback either write some nota bene documentation or pitch in for any code changes that may be necessary. |
Just saw Ivan answered this has already been improved in GraphQL.js 15.0.0-alpha.2. In fact the current master in GraphQL core only has the changes up to 15.0.0-alpha.1. These improvements will probably be ported in the next weeks as I am following up. |
graphql/graphql-js#2389 appears to still be a concern in Also, @pmantica1 and I are happy to pitch in and open PRs to port the GraphQL.js fixes if you'd like any help. |
Thank you. I'll go over the new changes in the coming days and let you know if you can help with anything. I'm trying to port every change in order, so this needs some coordination. |
Just a small progress report: GraphQL-Core v3.1.0b0 has been released today which is on par with GraphQL.js v15.0.0rc1. But as far as I understand, the problem is not yet fully solved upstream. |
First of all thanks for the amazing work in porting the GraphQL reference implementation.
I wanted to compute the fingerprint of a schema by running
lexicographic_sort_schema
andprint_schema
then computing the sha256 of the output.kensho-technologies/graphql-compiler#737
However, it is unclear whether
lexicographic_sort_schema
modifies the input schema. So I was having trouble documenting my function. Would you mind clarifying the function's spec?The text was updated successfully, but these errors were encountered: